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.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top