• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Set Movement Speed Issue

Status
Not open for further replies.
Level 4
Joined
Jun 15, 2019
Messages
24
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 73
Joined
Aug 10, 2018
Messages
7,866
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