Slow Trigger condition help!

Quakern

New Member
Reaction score
1
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):
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))
      • 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))
      • Custom script: call DestroyGroup(slow)
      • Custom script: set slow = null

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))
      • 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))
      • Custom script: call DestroyGroup(slow)
      • Custom script: set slow = null
 

Lord Regno

Active Member
Reaction score
19
Trigger:
  • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) x 80/100)
 

Quakern

New Member
Reaction score
1
Trigger:
  • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) x 80/100)

Would that really fix the problem?
Let's say that my strongest Frost Tower slows down the target by 60% for 4 seconds.
My weakest tower hits the target/targets 1 second later, and change it to 20%.
That would make it a 3 second slow loss with 60% slow in this example
 

Lord Regno

Active Member
Reaction score
19
Let say a unit has current moment speed 100

Then our weak tower hit it it will be lowered to 100-20= 80

Then it will be lowered to 32 because the action is current moment speed,

but if the weak tower fires 2 times before 3 sec it will be lowers to 100-20-20: 60 then after 3 sec it will get 100 (default moment speed) in moment speed to:

Trigger:
  • Unit - Set (Attacked unit) movement speed to ((Current movement speed of (Attacked unit)) x 1.20)
 

Quakern

New Member
Reaction score
1
Let say a unit has current moment speed 100

Then our weak tower hit it it will be lowered to 100-20= 80

Then it will be lowered to 32 because the action is current moment speed,

but if the weak tower fires 2 times before 3 sec it will be lowers to 100-20-20: 60 then after 3 sec it will get 100 (default moment speed) in moment speed to:

Trigger:
  • Unit - Set (Attacked unit) movement speed to ((Current movement speed of (Attacked unit)) x 1.20)

Well I want the unit to stay at the 20% slow, it's like if he's movement speed is 100 and 20% slower = 80. (100*80/100=80).

My towers have a 5 seconds cooldown too, and it wont add so it makes it any slower.

But a upgraded tower slows it down to 60%=40 movement speed in this example. Duration is 4 seconds.

The frost tower level 1 is 20% as I said. The problem is, if the upgraded tower hits the unit first, and before the duration of 4 sec fades, an weaker tower hits the unit. That will remove the first trigger, and keep it on the weakest tower. I need a good condition, or something to prevent this.

example: Frost Tower level 9 hits the unit =60% slow 4 sec.
1 second later, frost tower level 1 hits the unit = removes the first slow trigger because
Trigger:
  • Unit - Set (Picked unit) movement speed to ((Default movement speed of (Picked unit)) x (80.00 / 100.00))


I want something to prevent that from working if it is already infected with a stronger slow trigger.

So my question here is: Does anyone know a good condition or something else I could use to prevent it from working?
 

KillingSpree

New Member
Reaction score
7
I have just the condition you´re looking for! ;)

Trigger:
  • slow
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current movement speed of (Triggering unit)) Equal to (Default movement speed of (Triggering unit))
        • Then - Actions
          • -------- Slow --------
        • Else - Actions
          • Do nothing


the condition is a Real-comparison.
 

FootysMaXeD

New Member
Reaction score
0
That will not work well KillingSpree. If a Ice Tower level 1 attacks first, a Ice Tower level 9 slow will have no effect until the duration of IceTower1 is complete. I don't know the solution, sorry =(.

Btw, if you have any other Slow's in your map, these triggers might cause problems because of the "Set (Picked Unit) movement speed to (Default movement speed of (Picked Unit))."

Also, "Set TempGroup = (Units within 200.00 of TempPointSlow)" includes units that are yours, if they are in the AoE. I don't know if that's intentional, or even a problem since I think your map is a TD.
 

Lord Regno

Active Member
Reaction score
19
Btw, if you have any other Slow's in your map, these triggers might cause problems because of the "Set (Picked Unit) movement speed to (Default movement speed of (Picked Unit))."

thats whay he most replase it with

Trigger:
  • Unit - Set (Attacked unit) movement speed to ((Current movement speed of (Attacked unit)) x 1.20)


1.##: 1.10: add 10% 1.20 add 20%
 

Lehona

New Member
Reaction score
12
thats whay he most replase it with

Trigger:
  • Unit - Set (Attacked unit) movement speed to ((Current movement speed of (Attacked unit)) x 1.20)


1.##: 1.10: add 10% 1.20 add 20%

Wouldn't that be inaccurate? If you first substract 20% and after that add 20%, the value is at last lower than at start ;)

This should cover it:
Trigger:
  • Unit - Set (Attacked unit) movement speed to ((Current movement speed of (Attacked unit)) + (Default movement Speed of (Attacked Unit) x 0.20))
 

Quakern

New Member
Reaction score
1
I have just the condition you´re looking for! ;)

Trigger:
  • slow
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current movement speed of (Triggering unit)) Equal to (Default movement speed of (Triggering unit))
        • Then - Actions
          • -------- Slow --------
        • Else - Actions
          • Do nothing


the condition is a Real-comparison.

Yes that Works :D was looking for that, but didnt find it :p Thanks.. :)
 

Quakern

New Member
Reaction score
1
That will not work well KillingSpree. If a Ice Tower level 1 attacks first, a Ice Tower level 9 slow will have no effect until the duration of IceTower1 is complete. I don't know the solution, sorry =(.

True, but I made it like this, and that works :)
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
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (75.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (70.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (65.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (60.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (55.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (50.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (45.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (40.00 / 100.00))
            • Then - Actions
              • Unit - Set (Picked unit) movement speed to ((Default movement speed of (Picked unit)) x (80.00 / 100.00))
            • Else - Actions
              • Do nothing
      • 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
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (75.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (70.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (65.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (60.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (55.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (50.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (45.00 / 100.00))
                  • (Current movement speed of (Picked unit)) Not equal to ((Default movement speed of (Picked unit)) x (40.00 / 100.00))
            • Then - Actions
              • Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
            • Else - Actions
              • Do nothing
      • Custom script: call DestroyGroup(slow)
      • Custom script: set slow = null
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top