• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Trackable Problem

Status
Not open for further replies.
Level 16
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:
Status
Not open for further replies.
Top