I
IKilledKEnny
Guest
Hey, I tryed this trigger and it worked 100%.
But in JASS nothing happened.
[Edit: I also tryed GetTriggerWidget() and it didn't work, do I need to use the return bug?]
Also I saw that call TriggerRegisterAnyUnitEventBJ has a BJ so looked up in JASSCraft and I found somthing interesting (to me):
Can anyone explain this? Does it look though all players and then through all there units? If so seems like a slow function.
Does this leaks? I'm not sure I know that boolexprs leak, however as far as I know GUI doesn't fix it and I find it hard to believe that every triggedr in GUI leaks.
Thanks for any answer, I appreciate how helpful you all are, without you, now way I could have ever know about JASS like I do now (which isn't much but still )
Code:
Flag Effect Copy
Events
Unit - A unit Acquires an item
Conditions
Or - Any (Conditions) are true
Conditions
Flag (East) 0023 <gen> Equal to (Item being manipulated)
Flag (West) 0021 <gen> Equal to (Item being manipulated)
Actions
Special Effect - Create a special effect attached to the chest of (Triggering unit) using Objects\InventoryItems\BattleStandard\BattleStandard.mdl
But in JASS nothing happened.
Code:
function FlagEffectCon takes nothing returns boolean
if GetManipulatedItem()==gg_item_I001_0023 then
return true
endif
if GetManipulatedItem()==gg_item_I000_0021 then
return true
endif
return false
endfunction
function FlagEffectAct takes nothing returns nothing
call AddSpecialEffectTarget("chest", GetTriggerUnit(),"Objects\\InventoryItems\\BattleStandard\\BattleStandard.mdl")
endfunction
//===========================================================================
function InitTrig_Flag_Effect takes nothing returns nothing
set gg_trg_Flag_Effect=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flag_Effect, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition(gg_trg_Flag_Effect,Condition(function FlagEffectCon))
call TriggerAddAction(gg_trg_Flag_Effect,function FlagEffectAct)
endfunction
[Edit: I also tryed GetTriggerWidget() and it didn't work, do I need to use the return bug?]
Also I saw that call TriggerRegisterAnyUnitEventBJ has a BJ so looked up in JASSCraft and I found somthing interesting (to me):
Code:
function TriggerRegisterAnyUnitEventBJ takes trigger trig, playerunitevent whichEvent returns nothing
local integer index
set index = 0
loop
call TriggerRegisterPlayerUnitEvent(trig, Player(index), whichEvent, null)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
endfunction
Can anyone explain this? Does it look though all players and then through all there units? If so seems like a slow function.
Code:
call TriggerAddCondition(gg_trg_Flag_Effect,[B]Condition(function FlagEffectCon)[/B])
Does this leaks? I'm not sure I know that boolexprs leak, however as far as I know GUI doesn't fix it and I find it hard to believe that every triggedr in GUI leaks.
Thanks for any answer, I appreciate how helpful you all are, without you, now way I could have ever know about JASS like I do now (which isn't much but still )