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

Give multiple orders in a queue via triggers?

Status
Not open for further replies.
Level 5
Joined
Nov 7, 2007
Messages
134
When you manually control a unit you can hold shift while giving orders to make the unit execute them one at a time in succession, for example make a worker construct a building and when it's finished he while instantly begin constructing another one.

I was wondering if it's possible to do this via triggers? Like when using the "Issue order"-actions, so that the unit won't execute a new order until the first one is carried through.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
There is no way to save orders that way =/ You would have to create some way to detect when the unit finishes the first order.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Why you think that there is no way? :eek:
Actually you just need to store the orders into variables. Now you need to force the unit to execute the first order in the line.
Now if you execute another order, you simply check if the first stored order is null or not.
- If not the given order is ignored and the unit will continue with the current one.
-After done this order, you null it and replace this with the next order in the list and continue work

Well thanks to my bad English I can't describe it better but this should work in some way.

Greetings and Peace
Dr. Boom
 
Level 5
Joined
Nov 7, 2007
Messages
134
Does the order automatically null itself when it's done or do you have to do it manually? Because in the latter case, I'd still need some way to detect when the order is done and then this solution wouldn't really help.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
That's what i meant. You can order the unit to walk to an specific point, then, within the same trigger, create the region, and the trigger that detects the unit entering that region (cleaning leaks) and then issue the next order... Or something like that.
 
Level 5
Joined
Nov 7, 2007
Messages
134
Hm yeah, that might actually work, at least for movement orders. Guess I'll have to be creative like that. Thanks!
 
Status
Not open for further replies.
Top