BRUTAL
I'm working
- Reaction score
- 118
Do these certain people with certain powers not like TT?
private function a takes nothing returns nothing
local Data data = Data.create(GetTriggerUnit(), GetSpellTargetUnit())
call KT_Add(function PeriodicFunc, data, PERIOD)
endfunction
private function a takes nothing returns nothing
call KT_Add(function PeriodicFunc, Data.create(GetTriggerUnit(), GetSpellTargetUnit()) , PERIOD)
endfunction
private constant sound SOUND = gg_snd_FreezingBreathTarget1
call TriggerRegisterUnitEvent(Trig, .target, EVENT_UNIT_DAMAGED)
call TriggerAddCondition(Trig, Condition(function Data.checkdamage))
call TriggerAddAction(Trig, function Data.damage)
Okay I'll get to that.First, this is bad:
JASS:private function a takes nothing returns nothing local Data data = Data.create(GetTriggerUnit(), GetSpellTargetUnit()) call KT_Add(function PeriodicFunc, data, PERIOD) endfunction
This is good:
JASS:private function a takes nothing returns nothing call KT_Add(function PeriodicFunc, Data.create(GetTriggerUnit(), GetSpellTargetUnit()) , PERIOD) endfunction
Yea I forgot to change that after you explained sound variables.Third, how can this possibly work? Sure, if Jasshelper inlines constants now, it would, but...
JASS:private constant sound SOUND = gg_snd_FreezingBreathTarget1
Ahhh T_T so many things to adapt to. Give me some time and I'll get used to those aswell.Second, start using GTrigger.
Fourth,
JASS:call TriggerRegisterUnitEvent(Trig, .target, EVENT_UNIT_DAMAGED) call TriggerAddCondition(Trig, Condition(function Data.checkdamage)) call TriggerAddAction(Trig, function Data.damage)
That's kinda leaky. Using Damage (requires AIDS) would clean that up, but it sure does make your spell require a lotta systems!