• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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,240
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