Hi there!
Well my trigger works now, but noticed that i miss an condition to make it perfect! My trigger slows down the target by 20% and every1 around the target by 200 range. But if I have 2 towers hitting the same group makes it still 20%, but when I upgrade my tower then it's 25% slower.
So if my ugraded tower hits the target first, slows him down by 25%, then my other tower slows him back to 20%. It's supposed to be slowed down by the strongest tower for x sec before any weaker tower makes any effect.
So does any1 have an great idea for what condition I could use? I thought about something like this: attacked unit equal to default movement speed. But couldnt find that condition, and that would screw up if a better tower hits it too.
Here's my trigger (there are 9 different Frost Towers):
Well my trigger works now, but noticed that i miss an condition to make it perfect! My trigger slows down the target by 20% and every1 around the target by 200 range. But if I have 2 towers hitting the same group makes it still 20%, but when I upgrade my tower then it's 25% slower.
So if my ugraded tower hits the target first, slows him down by 25%, then my other tower slows him back to 20%. It's supposed to be slowed down by the strongest tower for x sec before any weaker tower makes any effect.
So does any1 have an great idea for what condition I could use? I thought about something like this: attacked unit equal to default movement speed. But couldnt find that condition, and that would screw up if a better tower hits it too.
Here's my trigger (there are 9 different Frost Towers):
Trigger:
- Slow
- Events
- Unit - A unit Is attacked
- Conditions
- (Unit-type of (Attacking unit)) Equal to Frost Tower
- Actions
- Custom script: local group slow
- Set TempPointSlow = (Position of (Attacked unit))
- Set TempGroup = (Units within 200.00 of TempPointSlow)
- Custom script: call RemoveLocation(udg_TempPointSlow)
- Unit Group - Pick every unit in TempGroup and do (Actions)
- Loop - Actions
- Unit - Set (Picked unit) movement speed to ((Default movement speed of (Picked unit)) x (80.00 / 100.00))
- Loop - Actions
- Custom script: set slow = udg_TempGroup
- Wait 2.00 seconds
- Custom script: set udg_TempGroup = slow
- Unit Group - Pick every unit in TempGroup and do (Actions)
- Loop - Actions
- Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
- Loop - Actions
- Custom script: call DestroyGroup(slow)
- Custom script: set slow = null
- Events
Trigger:
- Slow 4
- Events
- Unit - A unit Is attacked
- Conditions
- (Unit-type of (Attacking unit)) Equal to Frost Tower Level 4
- Actions
- Custom script: local group slow
- Set TempPointSlow = (Position of (Attacked unit))
- Set TempGroup = (Units within 200.00 of TempPointSlow)
- Custom script: call RemoveLocation(udg_TempPointSlow)
- Unit Group - Pick every unit in TempGroup and do (Actions)
- Loop - Actions
- Unit - Set (Picked unit) movement speed to ((Default movement speed of (Picked unit)) x (65.00 / 100.00))
- Loop - Actions
- Custom script: set slow = udg_TempGroup
- Wait 3.00 seconds
- Custom script: set udg_TempGroup = slow
- Unit Group - Pick every unit in TempGroup and do (Actions)
- Loop - Actions
- Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
- Loop - Actions
- Custom script: call DestroyGroup(slow)
- Custom script: set slow = null
- Events