• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Requesting Trigger

Status
Not open for further replies.
Level 7
Joined
May 18, 2010
Messages
264
  • Remove
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (==) |cffff0000Remove unit|r
    • Actions
      • Unit - Order |cffff0000Remove unit|r 0000 <gen> to Stop
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Target unit of issued order)) Not equal to (!=) Player 1 (Red)
            • (Triggering player) Equal to (==) Player 1 (Red)
            • ((Triggering unit) is selected by Player 1 (Red)) Equal to (==) True
          • Then - Actions
            • Unit - Remove (Target unit of issued order) from the game
          • Else - Actions
Eq:
When u rightclick on unit while having {Remove Unit} selected u remove the unit that u rightclick on (except youre)

Its working now

Thx for help "Pharaoh_
 
Last edited:
So you want the unit that is ordered to attack/follow a certain unit under the ownership of Player 1 (Red) to stand still instead?

  • S
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: call IssuePointOrder (u, "move", GetUnitX (u), GetUnitY (u))
      • Custom script: set u = null
 
Level 7
Joined
May 18, 2010
Messages
264
So you want the unit that is ordered to attack/follow a certain unit under the ownership of Player 1 (Red) to stand still instead?

  • S
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: call IssuePointOrder (u, "move", GetUnitX (u), GetUnitY (u))
      • Custom script: set u = null

No.
i would pause the unit then or order it to stop

(Triggering player) Equal to Player 1 (Red) this is what i need
i need unit to be removed
 
Ah you want the unit removed; I thought you wanted to disable the right click of the mouse, by ignoring given orders.
Make sure you use a condition ("Issued order" Equal to (order(smart))" (order comparison) (will detect the right click).
Also use (Unit-type of (Target unit of issued order)) Equal to Remove unit. The (Triggering unit) you placed refers to the unit that has been ordered, not the target of the issued order.
 
Status
Not open for further replies.
Top