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