OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Praxtor.. on 17 Mar 2007, 18:33:01

Title: EventHandler Hit Don´t Work in MP?
Post by: Praxtor.. on 17 Mar 2007, 18:33:01
Hello Guys:

I am trying to detect the impact in one Pop up Target, the pop up targets of the training course, now i am ussing this Script:



Quote
i=0

Obj1 addeventhandler ["hit",{i = i + 1}]


#bucle

hint format ["%1 Impacts",i]

goto "bucle"


It donÂ't work in Mp, in Sp all work correct  i can see 1 impacts, 2 impacts.... But when i try in Mp i only can see 0 Impacts

Some idea???
Title: Re: EventHandler Hit Don´t Work in MP?
Post by: h- on 18 Mar 2007, 08:48:56
Try changing the eventHandler to
Code: [Select]
Obj1 addeventhandler ["hit",{i = i + 1; publicVariable "i"}]before the hint, maybe that helps :dunno: