Can someone explain to me how Boolean Expressions work.
Seems like I got problems with them cause sometimes they work and sometimes
they don't
For example:
This doesn't work....
Question that I have:
1. When using with TriggerRegister.... function what do I have to use GetTriggerUnit(), GetFilterUnit .....
2. Can I store the boolexpr in variable and then use it(my point is would it be calculated when the variable is created and not when the event starts)
Seems like I got problems with them cause sometimes they work and sometimes
they don't
For example:
JASS:
function Trig_Revive_Zombies_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer i = GetRandomInt(1,20)
call SetUnitAbilityLevel(u,039;z000039;,i)
call msg(0,GetUnitName(u) + " Reincarnation Level " + I2S(GetUnitAbilityLevel(u,039;z000039;)) + " should be " + I2S(i))
endfunction
function IsTriggerUnitZombie takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == 039;n000039;
endfunction
//===========================================================================
function InitTrig_Revive_Zombies takes nothing returns nothing
set gg_trg_Revive_Zombies = CreateTrigger( )
call TriggerRegisterPlayerUnitEvent(gg_trg_Revive_Zombies,Player(11),EVENT_PLAYER_UNIT_DEATH,Condition(function IsTriggerUnitZombie))
call TriggerAddAction( gg_trg_Revive_Zombies, function Trig_Revive_Zombies_Actions )
endfunction
This doesn't work....
Question that I have:
1. When using with TriggerRegister.... function what do I have to use GetTriggerUnit(), GetFilterUnit .....
2. Can I store the boolexpr in variable and then use it(my point is would it be calculated when the variable is created and not when the event starts)