• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Order Que Manipulation

Status
Not open for further replies.
Level 5
Joined
Mar 22, 2009
Messages
170
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
170
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