• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Channeling Ability

Status
Not open for further replies.
Level 7
Joined
Jul 21, 2015
Messages
103
So I am trying to get an ability (life drain) to halt movement speed to 0 and then reset it back to normal. I created two triggers to do this but they don't seem to work. I altered life drain to mimic aerial shackles. The reason I don't just use that ability is because I am making a maze custom map and if a hero did aerial shackle the units would have to reset their triggers which i don't want to go through the effort of making.
BTW: shackles = my altered ability not Aerial Shackles
First Trigger:
First Trigger
Events
Unit - A unit Begins channeling an ability
Conditions
(Ability being cast) Equal to Shackles
Actions
Set Integer = (Integer((Current movement speed of (Target unit of ability being cast))))
Unit - Set (Target unit of ability being cast) movement speed to 0.00
Trigger - Turn on Second Trigger <gen>
Second Trigger (not initially on):

Second Trigger
Events
Unit - A unit Stops casting an ability
Conditions
(Ability being cast) Equal to Shackles
Actions
Unit - Set (Target unit of ability being cast) movement speed to (Real(Integer))
Trigger - Turn off (This trigger)
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
There are a lot of possibilities to stop a unit from moving, but setting movement speed to 0 is not one of them. There is a minimum movement speed of 150 for units, maybe if you set it to 0 in the gameplay constants it could work.
You can use to prevent movement:
  • order stop 0 seconds after movement was ordered (movement can also be ordered by right click, attack, patrol, spell cast, ...), does not work, if your unit can carry items, because as far as I know you cannot detect when a unit is ordered to drop an item
  • pause the unit
  • use an ability with a dummy caster (stun, ensnare, entangle, shackle)
There are more options, but these are the best ones I could think of.
 
Level 7
Joined
Jul 21, 2015
Messages
103
There are a lot of possibilities to stop a unit from moving, but setting movement speed to 0 is not one of them. There is a minimum movement speed of 150 for units, maybe if you set it to 0 in the gameplay constants it could work.
You can use to prevent movement:
  • order stop 0 seconds after movement was ordered (movement can also be ordered by right click, attack, patrol, spell cast, ...), does not work, if your unit can carry items, because as far as I know you cannot detect when a unit is ordered to drop an item
  • pause the unit
  • use an ability with a dummy caster (stun, ensnare, entangle, shackle)
There are more options, but these are the best ones I could think of.
Thanks a lot worked perfectly
 
Status
Not open for further replies.
Top