• 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.

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 73
Joined
Aug 10, 2018
Messages
7,883
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 73
Joined
Aug 10, 2018
Messages
7,883
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