• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] stacking movement decrease

Status
Not open for further replies.
Level 9
Joined
Jan 1, 2009
Messages
94
Hi guys,
Today i started to make an aura, which periodicaly decreases movement speed of units in range by xy and if the movement speed is low it will be freezed and got damaged.

Now my problem:
If units get into the field of the aura (which i made with an periodic trigger) they just get once reduced their movement speed even if the aura hits them several times.

I used:
Set (Picked unit) movement speed to ((Current movement speed of (Picked unit)) - 30

Can anyone help me?
 
Level 15
Joined
Oct 16, 2010
Messages
941
Set (Picked unit) movement speed to ((Current movement speed of (Picked unit)) - 30

Theres nothing wrong with this

1. Can you post the entire code
2. What are you using to refer to units in the field? You can't use enter region or comes within X yards b/c those will only trigger every time they enter. You need to make it periodically put every unit within X yards of a position into a group and then run through your calculations reffering to units in the group.
 
Level 12
Joined
Nov 20, 2007
Messages
660
To reduce movement speed AOE you don't need triggers, there is an ability called Slow Aura (Tornado) and you can use it to slowdown units speed.
To detect players movement speed use an periodic trigger (time 0.03) to check all units with Slow Aura buff.
Still need help ? replay me and if you want i can make this aura for you :)
 
Level 9
Joined
Jan 1, 2009
Messages
94
  • freezing ground
    • Events
      • Map initialization
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Entire map)(((Matching unit) has buff freezing ground ) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set Freezer = (Picked unit)
          • Unit Group - Pick every unit in (Units within (400.00 + ((Real((Level of freezing ground for Freezer))) x 100.00)) of (Position of Freezer) matching (((Matching unit) belongs to an enemy of (Owner of Freezer)) Equal to True)) and do (Actions)
            • Loop - Actions
              • Unit Group - Add (Picked unit) to freezed_units
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current movement speed of (Picked unit)) Less than 25.00
                • Then - Actions
                  • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Create 1 Dummy (freezing ground) for (Owner of Freezer) at (Position of Freezer) facing Default building facing (270.0) degrees
                  • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to Night Elf Druid Of The Claw - Rejuvenation (Picked unit)
                  • Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Cyclone (Picked unit)
                  • Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff iceblock ) Equal to False
                    • Then - Actions
                      • Unit - Set (Picked unit) movement speed to ((Current movement speed of (Picked unit)) - ((Real((Level of freezing ground for Freezer))) x 50.00))
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Undead\FrostArmor\FrostArmorDamage.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
      • Unit Group - Pick every unit in freezed_units and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is in (Units within (400.00 + ((Real((Level of freezing ground for Freezer))) x 100.00)) of (Position of Freezer) matching (((Matching unit) belongs to an enemy of (Owner of Freezer)) Equal to True))) Equal to False
            • Then - Actions
              • Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
              • Unit Group - Remove (Picked unit) from freezed_units
            • Else - Actions
freezing ground is the aura-ability.
The dummy casts an iceblock (immobilize) and a DOT.

I know that they are some leaks, but i will cut em out if i got the buggy thing
 
Level 9
Joined
Jun 25, 2009
Messages
427
Hey so did the aura for you :)

It works perfectly and there are no leaks

What can be changed: The dummy ability (i used stun, just to show you how it works) then the slow amount can be changed (currently it is 2xlvl ms every 0.04 seconds, 25 hits per second=50/100/150 -ms/sec.
All the special effects can be changed.

This spell is for you (;

If any changes are required please write them here.

And yeah, as Dr.Super Good said: remember to set the minimum movement speed in the gameplay constants.

Tiche3
 

Attachments

  • Map to help Hivers By Tiche3.w3x
    74 KB · Views: 40
Last edited:
Level 9
Joined
Jan 1, 2009
Messages
94
Hey so did the aura for you :)

It works perfectly and there are no leaks

What can be changed: The dummy ability (i used stun, just to show you how it works) then the slow amount can be changed (currently it is 2xlvl ms every 0.04 seconds, 25 hits per second=50/100/150 -ms/sec.
All the special effects can be changed.

This spell is for you (;

If any changes are required please write them here.

And yeah, as Dr.Super Good said: remember to set the minimum movement speed in the gameplay constants.

Tiche3

Big thanks to you, this is what i just thought of.


I know found my mistake: I realy forgot about the gameplay constants, because my pc crashed 2 times during developing my spell and i already did this, but forgot to save (so thanks to Dr Super Good for pointing this out :grin:).
 
Status
Not open for further replies.
Top