- Joined
- Oct 12, 2008
- Messages
- 1,570
~Solved~
I added both actions to the same trigger, and not to the different ones,,
Hello people
I have been trying out some things with Trackables,, but i cant get it to work properly
JASS:
function Track takes nothing returns nothing
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"Track")
endfunction
function Hit takes nothing returns nothing
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"Hit")
endfunction
//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger u = CreateTrigger()
local trackable tt = CreateTrackable("units\\human\\Peasant\\Peasant.mdl", 0,0,0)
call TriggerRegisterTrackableHitEvent(t,tt)
call TriggerRegisterTrackableTrackEvent(u,tt)
call TriggerAddAction(t,function Hit)
call TriggerAddAction(t,function Track)
endfunction
This is my code, and it shows the messages, only not at the right moment.
As soon as i click the trackable, it shows both, but it should only show one on hit, and one on track,,
Any ideas? Or cant you give both events to the same trackable? =S
-Yixx,,-
Last edited: