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

[JASS] UnitAddAbility(currentUnit, 'Amov')

Status
Not open for further replies.
Level 7
Joined
Jul 20, 2008
Messages
377
Why is it that

JASS:
UnitRemoveAbility(currentUnit, 'Amov')

will indeed remove the ability to move (takes away the move, stop, hold position, and patrol buttons) but

JASS:
UnitAddAbility(currentUnit, 'Amov')

does not add them back?

What makes an ability un-addable?
 
Level 9
Joined
Nov 28, 2008
Messages
704
I can't say for sure, but I would guess that those buttons all require moving to function, and that when move is removed, they can not function, and go away? beats me.
 
Level 7
Joined
Jul 20, 2008
Messages
377
Let me clarify. As far as I'm concerned, adding Amov doesn't work, period. I'm wondering why it does nothing when you add Amov to an unit which had Amov removed from it earlier.
 
Level 3
Joined
May 3, 2004
Messages
46
Can a unit still walk around with the help of triggers even if it doesn't have the Amov ability?

I fear it cannot, but if it can I suppose you could just make a dummy ability in its place.
 
Level 7
Joined
Jul 20, 2008
Messages
377
if it doesnt move, check for the unit movement speed, because 0 movement removes the ability automatically, perhaps you just have to reset the movement speed to default movement speed of the unit

Odd, because when I tried to set the unit's movement speed to 0, it still had the move command and everything. Even setting the movement speed and turn speed to 0 doesn't strip away the move button and whatsnot. I was doing this to a default footman unit, by the way. And yes, I did set the minimum movement speed to 0 in the constants.

Any other ideas for how to temporarily disable the move button and all? I thought about something akin to a root ability, but I'd like to see what other ideas are available. :D
 
Level 7
Joined
Jul 20, 2008
Messages
377
But then it wouldn't be able to use other abilities. Sorry, I should've stated that in the first post.

I want the unit to not be able to move or anything, and have these move command icons disabled, AND still be able to use other abilities.
 
Level 7
Joined
Jul 20, 2008
Messages
377
Oh well, I took a different approach in my map. I decided to not disable movement in any way, but thanks for all your help, guys! + Rep.
 
Status
Not open for further replies.
Top