I made this trigger to remove the spell when deactivate the skill.
But now i noticed that if the mana ends the skill is deactivated but the other skill don't get removed. x.x
I tried to the trigger to run too when the unit as 6 mana or less.
But it just don't work(The mana part). Why?
Quick Questions
1. String2OrderIdBJ its better use it or inline it?
2. CreateNUnitsAtLoc its better use it or inline it?
3. Whats better/faster?
I.
or
II.
Thanks =}
But now i noticed that if the mana ends the skill is deactivated but the other skill don't get removed. x.x
I tried to the trigger to run too when the unit as 6 mana or less.
JASS:
scope InsanityDeactivation initializer Initial
private function Conditions takes nothing returns boolean
if ( GetIssuedOrderId() == String2OrderIdBJ("unimmolation") ) then
return true
else
return false
endif
endfunction
private function Actions takes nothing returns nothing
call UnitRemoveAbility( GetTriggerUnit(), 039;A005039; )
endfunction
private function Initial takes nothing returns nothing
local trigger trig = CreateTrigger()
local unit u = GetTriggerUnit()
call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterUnitStateEvent( trig, u, UNIT_STATE_MANA, LESS_THAN_OR_EQUAL, 6.00 )
call TriggerAddCondition( trig, Condition( function Conditions ) )
call TriggerAddAction( trig, function Actions )
endfunction
endscope
But it just don't work(The mana part). Why?
Quick Questions
1. String2OrderIdBJ its better use it or inline it?
2. CreateNUnitsAtLoc its better use it or inline it?
3. Whats better/faster?
I.
JASS:
if something then
return true
else
return false
endif
or
II.
JASS:
if something then
return true
endif
return false
Thanks =}