Hey there!
I am trying to make a trigger, that everyone in 100 range of the attacked unit (attacking unit=my slow tower), is running 20% slower for 2 seconds.
My trigger now looks like this:
I get for some reason error on the wait command and destroy the local variable :S
Anyone knows how to fix this? Or something like this would work? I'm kindy new on this, so im not 100% sure ^^
I am trying to make a trigger, that everyone in 100 range of the attacked unit (attacking unit=my slow tower), is running 20% slower for 2 seconds.
My trigger now looks like this:
Trigger:
- Slow
- Events
- Unit - A unit Is attacked
- Conditions
- (Unit-type of (Attacking unit)) Equal to Frost Tower
- Actions
- Custom script: local group udg_slow
- Custom script: set udg_slow = GetUnitsInRangeOfLocAll(100.00, GetUnitLoc(GetAttackedUnitBJ()))
- Custom script: call ForGroupBJ( udg_slow,( GetUnitDefaultMoveSpeed(GetEnumUnit()) * ( 80.00 / 100.00 ) ) )
- Custom script: call TriggerSleepAction( 2 )
- Custom script: call ForGroupBJ( udg_slow,( GetUnitDefaultMoveSpeed(GetEnumUnit()) ) )
- Custom script: call DestroyGroup(udg_slow)
- Events
I get for some reason error on the wait command and destroy the local variable :S
Anyone knows how to fix this? Or something like this would work? I'm kindy new on this, so im not 100% sure ^^