First of all go to gameplay constants, and find the field called Minimum move speed and set it to 0. Then set the move speed of the unit you want to be immobile to 0.
call UnitRemoveAbility( whichunit, 'Amov' )
JASS:call UnitRemoveAbility( whichunit, 'Amov' )
Raw Data OrdersAttack - Aatk
ARal - Rally Point (Buildings)
Amov - Move
Adef - Footman's Defend
Name - Raw CodeAttack - Aatk
Move - Amov
Locust - Aloc
Hero - AHer
On Fire - Afir
Turret - Attu
How can I remove all the button icons (move,attack move,patrol) without interfering with other things? I just want to restrict the user from moving or stopping the unit at his own will.
Anyway, whats wrong with the trigger i show above? Why does the game crashes?
Try to remove the Hero ability from a hero and move the cursor over the hero. What do you think will happen?
Fatal Error!
What if you add the Hero ability to a unit?
-*meow*
You can give the unit the "Ward" classifications ( dont know if spelled right ), but that will hide the entire UI of the unit ( like spells ) and you can only order the unit with rightclick. And Vexorian made a super order stop for his Selection System, where you can do nothing with the hero, but select. No sure if i'm allowed to post the trigger here ( JASS ). Could be done in GUI too.
I dont see any troubles with the trigger. Maybe some other trigger crashes the game.