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

Order Que Manipulation

Status
Not open for further replies.
Level 5
Joined
Mar 22, 2009
Messages
172
Is there any way to manipulate the order queue, such as adding several orders to the queue to do one after the other, or adding an order to the end or beginning of the queue? I need to be able to do this for a system to work, unless there is another method.
 
Level 5
Joined
Mar 22, 2009
Messages
172
Well, What I mean by queue, is the queue you get when you hold down shift while issuing orders. Those functions interrupt the queue, But I need a method that lets you insert orders. I dont think there is a method to do so, but I still trying to find one.
 
There is no such thing in jass. But you have a librairy for that.
I find the way to use it a bit complicated, there is an example of use :

JASS:
function Example takes nothing returns nothing
    local destructable DummyGate=CreateDestructable('LTg3',-256,0,0,0.9,0)
    local unit orderedUnit=CreateUnit(Player(0),'hfoo',0,0,0)
    local OrderQueue OrderList=OrderQueue.create()
    local Order SimpleOrder
    call OrderList.SetOwner(orderedUnit,true)
    call OrderList.Push(SimpleOrder.createPointTarget(SimpleOrder.ID_MOVE,200,500))
    call OrderList.Push(SimpleOrder.createPointTarget(SimpleOrder.ID_MOVE,100,-100))
    call OrderList.Push(SimpleOrder.createNoTarget(OrderId("defend")))
    call OrderList.Push(SimpleOrder.createWidgetTarget(w.ID_ATTACK,DummyGate))
    call OrderList.Push(SimpleOrder.createPointTarget(w.ID_MOVE,-500,0))
endfunction

I hope you know a bit jass because you'll need it ^^.
 
Status
Not open for further replies.
Top