Give Build Order with lua

Give Build Order with lua

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Thor
NOTA Developer
Posts: 291
Joined: 05 Mar 2006, 10:26

Give Build Order with lua

Post by Thor »

Could someone please show me an example of how to give a build order to a unit or factory? thanks

edit: got it now, thanks lurker
Last edited by Thor on 05 Aug 2008, 22:09, edited 1 time in total.
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: Give Build Order with lua

Post by Evil4Zerggin »

IIRC the CMD id to build a unit is -unitDefID. Not sure what parameters to give it, though; try {} or {x, y, z}. To give the order to a unit try this:

Code: Select all

Spring.GiveOrderToUnit(builderUnitID, -unitToBuildDefID, {--[[not sure what to put for params]]}, options})
Post Reply

Return to “Lua Scripts”