• 🏆 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!

Set Movement Speed Issue

Status
Not open for further replies.
Level 4
Joined
Jun 15, 2019
Messages
23
Hello everyone! I've encountered an issue when i try to make a trigger that sets a unit's movement speed to 0. I have changed the minimum movement speed in gameplay constants yet it still won't work. Basically, Naxx is supposed to not be able to move at the start of the game but is able to move through an ability.
Untitled.png
Untitled.png

Here is the object editor file for Naxx's speed.
Untitled.png

And here's the ability, based off of War Stomp.
Untitled.png
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
Some problems with your spell trigger:

1) Use the Event: A unit Starts the effect of an ability
This Event happens the moment the spell actually casts (goes on cd, spends mana, etc). Finishes Casting is not safe to use and under certain circumstances it may not run.

2) Since you're using a Wait you're now open to issues if you don't handle it properly. Every single Event Response (aside from Triggering Unit) acts like a global variable that can only be set to one unit at a time. So the moment an Event goes off, such as a unit casting an ability, that unit will be assigned as the new Casting Unit. In your case this means that after 20.00 seconds there's an extremely high chance that Casting Unit will not be your unit that casted Skies of Death.

The solution to #2 is simple most of the time. Use the Triggering Unit Event Response, as this acts like a local variable instead of a global variable and will remain the same throughout the entire trigger, even with Waits.
 
Last edited:
Status
Not open for further replies.
Top