[Solved] How to remove an unit movement possibility

Status
Not open for further replies.
Level 4
Joined
Jul 22, 2010
Messages
63
Have, I want to when an unit enter a region, to it may unable to do anything, like, move, hold, stop, attack, patrol and etc, removing the buttons at the left bottom corner.
How do I "trigger" this?! (setting movement speed to 0 still can make the unit walk! but slowly, and I doesnt want this)

Thanks in advance
 
Unit - Pause unit might suit your needs.

  • Custom script: call SetUnitPropWindow(*unit*, 0)
will make the unit unable to move. It can still turn and attack.

To disable attack, give it an ability based on Cargo Hold (Orc Burrow). Set Data - Cargo Capacity to 0.

One option is to add the unit into a unit group and use this trigger:
  • Untitled Trigger 014
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • ((Triggering unit) is in group) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Pause (Triggering unit)
      • Unit - Order (Triggering unit) to Stop
      • Unit - Unpause (Triggering unit)
      • Trigger - Turn on (This trigger)
With this, the unit can't do anything.
 
Status
Not open for further replies.
Back
Top