hey,
this is my first trigger in jass. it doesn't have any traceback malfunctions, but for some reason it just does absolutely nothing in game. what did I do wrong here?
thanks...
obv there are more parts to it, but it doesn't even show the debug stuff here that shouldn't be dependant on anything else...
this is my first trigger in jass. it doesn't have any traceback malfunctions, but for some reason it just does absolutely nothing in game. what did I do wrong here?
Code:
function taken_conditions takes nothing returns boolean
if (GetManipulatedItem() == udg_Bait ) then
call BJDebugMsg("item moved")
//call DisplayTextToForce( GetPlayersAll(), "moved" )
return true
endif
call BJDebugMsg("not item?")
//call DisplayTextToForce( GetPlayersAll(), "not?" )
return false
endfunction
function taken_actions takes nothing returns nothing
call BJDebugMsg("got trig unit")
set udg_Carrier = GetTriggerUnit()
if (IsTriggerEnabled(gg_trg_ChaseLoop) == false) then
call EnableTrigger(gg_trg_ChaseLoop)
endif
endfunction
function InitTrig_taken takes nothing returns nothing
local trigger taken = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(taken,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(taken,Condition(function taken_conditions))
call TriggerAddAction(taken,function taken_actions)
endfunction
thanks...
obv there are more parts to it, but it doesn't even show the debug stuff here that shouldn't be dependant on anything else...