• 🏆 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!

Preventing Orders

Status
Not open for further replies.
Level 12
Joined
Feb 11, 2008
Messages
809
I need links to preventing orders tutorials and at the least some explanations on the best way to prevent certain orders such as if a unit is issued the order to move how is the best way to stop the unit from doing this order.

I am in search of the best way so that I can use it in my system for much better efficiency.

Heres a link to my system so you can better understand what I am talking about and yes I will use JASS/vJASS if there is a more efficient way using them.

http://www.hiveworkshop.com/forums/...v2-5-a-187541/?prev=search=object&d=list&r=20

Please and thanks once again :thumbs_up:
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 029
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Unit Group - Add (Triggering unit) to group
      • Trigger - Turn on Untitled Trigger 009 <gen>
  • Untitled Trigger 009
    • Events
      • Time - Every 0.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Stop
          • Unit Group - Remove (Picked unit) from group
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
You can add the orders and some other conditions. When you order the unit to stop, you can order to hold pos or something else. Face angle etc.

Another way is to instantly order the unit to move to it's current position:
  • Untitled Trigger 029
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Custom script: call IssuePointOrderById(GetTriggerUnit() , 851988 , GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()))
      • Trigger - Turn on (This trigger)
851988 is move order. There's GUI command for the move order also.
 
Level 12
Joined
Feb 11, 2008
Messages
809
  • Untitled Trigger 029
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Unit Group - Add (Triggering unit) to group
      • Trigger - Turn on Untitled Trigger 009 <gen>
  • Untitled Trigger 009
    • Events
      • Time - Every 0.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Stop
          • Unit Group - Remove (Picked unit) from group
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
You can add the orders and some other conditions. When you order the unit to stop, you can order to hold pos or something else. Face angle etc.

Another way is to instantly order the unit to move to it's current position:
  • Untitled Trigger 029
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Custom script: call IssuePointOrderById(GetTriggerUnit() , 851988 , GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()))
      • Trigger - Turn on (This trigger)
851988 is move order. There's GUI command for the move order also.

Alright but i don't want to have to create a separate trigger for each player so I can not use turn on/turn off trigger actions it has to be MPI.

EDIT*

Currently I was making a unit attack the ground at the same facing of the unit offset by a little bit so the unit will turn and face the correct direction is this the best way? I was thinking maybe there was something better just look at my system for more info.
 
Last edited:
Status
Not open for further replies.
Top