jig7c
Stop reading me...-statement
- Reaction score
- 123
I don't want to use PolledWait, nor TriggerSleepAction..
whats a good timer system i can use for my spells...
whats a good timer system i can use for my spells...
scope Example initializer Init
struct Hehe
unit cast
private method periodic takes nothing returns nothing
call SetUnitState(.cast,UNIT_STATE_LIFE,GetWidgetLife(.cast)-3)
if T32_Tick > 30 then
call this.stopPeriodic()
endif
endmethod
implement T32x
static method create takes unit u returns Hehe
local thistype this = thistype.allocate()
set .cast = u
return this
endmethod
endstruct
private function Check takes nothing returns boolean
if GetSpellAbilityId() == 039;A000039; then
call Hehe.create(GetTriggerUnit()).startPeriodic()
endif
return false
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Check))
endfunction
endscope
How is T32 for intermediate? o.0
It's the only timer-system I've ever used ._.
And..
Erm..
What about it is advanced? xD