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

Reset queued order

Status
Not open for further replies.
Level 7
Joined
Jul 4, 2007
Messages
249
Hello there,
I've been attempting to make a rally point that overrides the regular rally point of a building. It works until the unit reaches its destination, then it turns back to wherever the ordinary rally point was set. I tried using order unit to stop and right-click ground in an attempt to cancel the order but it still remains queued.

Any ideas on how to solve this?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
That sounds really weird, are these units computer controlled or something? Maybe the AI is causing problems. I feel like if you ordered the unit to Stop in response to it's original Rally order, then gave it a new order, that should work.

Can you post your triggers?
 
Level 7
Joined
Jul 4, 2007
Messages
249
Thanks for taking your time to reply.
I've resolved the problem by adding a wait, I should have known this. I'll put an example for those who come here with the same issue.

  • recruit
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
    • Actions
      • Set VariableSet tempUnit2 = (Trained unit) // tempUnit is of course unusable now because of wait
      • Unit - Order tempUnit2 to Stop.
      • Wait 0.00 seconds
      • Set VariableSet tempPosition = (Position of (Triggering unit))
      • Unit - Order (Trained unit) to Attack-Move To tempPosition
      • Custom script: call RemoveLocation( udg_tempPosition )
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
You should use the Shadowing technique to keep it MUI:
  • Actions:
  • Custom script: local udg_tempUnit2 = GetTrainedUnit()
  • Unit - Order tempUnit2 to Stop.
  • Wait 0.00 seconds
  • Set VariableSet tempPosition = (Position of (Triggering unit))
  • Unit - Order tempUnit2 to Attack-Move To tempPosition
  • Custom script: call RemoveLocation( udg_tempPosition )
  • Custom script: set udg_tempUnit2 = null
Also, you're ordering the Trained unit to move to the position of the Triggering unit (building), but isn't it already there by default?
 
Level 7
Joined
Jul 4, 2007
Messages
249
You should use the Shadowing technique to keep it MUI:
  • Actions:
  • Custom script: local udg_tempUnit2 = GetTrainedUnit()
  • Unit - Order tempUnit2 to Stop.
  • Wait 0.00 seconds
  • Set VariableSet tempPosition = (Position of (Triggering unit))
  • Unit - Order tempUnit2 to Attack-Move To tempPosition
  • Custom script: call RemoveLocation( udg_tempPosition )
  • Custom script: set udg_tempUnit2 = null
Also, you're ordering the Trained unit to move to the position of the Triggering unit (building), but isn't it already there by default?
Oh cool that's really nice, thanks.
Yea it is, it was just an example. If you move the original rally you notice though because its effect will be overridden
 
Last edited:
Status
Not open for further replies.
Top