| 01-24-2007, 07:56 PM | #1 |
I need to remove the spells Patrol and Move from my unit to stop it from moving. I might be doing it wrong but it's not working =(. JASS:call UnitRemoveAbility(udg_Units[1],String2OrderIdBJ("patrol")) call UnitRemoveAbility(udg_Units[1],String2OrderIdBJ("move")) Is this wrong? |
| 01-24-2007, 08:10 PM | #2 |
I've tried before and can't find a way to remove those abilities from a hero. Your actions are wrong btw. An order id is different from an ability id. Depenind on what you're trying to do, you could use PauseUnit(u,true) or you could set the movespeed to 0. I believe pausing the unit would also make it unable to attack, so it depends on your purpose. |
| 01-24-2007, 08:10 PM | #3 |
Yes. UnitRemoveAbility takes a rawcode for the ability. You are giving a OrderId. Removing the standard abilities have side effects. Please use the search feature, you'll get your question answered alot faster, i cant remember all of the solutions and answers, but you'll find them through searching. Here, i started a search for you :P. http://wc3campaigns.net/search.php?searchid=135348 |
