• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
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.
Top