request : building combo multiplier thing

request : building combo multiplier thing

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

Moderator: Moderators

Post Reply
Hacked
Posts: 116
Joined: 15 Aug 2008, 18:06

request : building combo multiplier thing

Post by Hacked »

basically, i want my con to build two buildings over and over, much like the way we hold shift and drag to multiply build orders for one building, but for 2 or even more different buildings.

only because i like my t1 cons to build adv solar + mm a few times in the back. currently, its the only thing that stops me from devoting time to front lines
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: request : building combo multiplier thing

Post by Hoi »

let 1 build solar and one MM?
Hacked
Posts: 116
Joined: 15 Aug 2008, 18:06

Re: request : building combo multiplier thing

Post by Hacked »

there are syncing problems associated with that
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: request : building combo multiplier thing

Post by REVENGE »

AFAIK, work is being done on something with said functionality.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: request : building combo multiplier thing

Post by lurker »

Hacked wrote:there are syncing problems associated with that
Well, metal makers are roughly free, and if you have either widget or groupai managing them you don't need to worry about timing, since extras will turn off.
Hacked
Posts: 116
Joined: 15 Aug 2008, 18:06

Re: request : building combo multiplier thing

Post by Hacked »

thanks everyone
im actually trying to make this myself
on my quest to learning lua scripting for spring

currently, im having trouble with giveordertounit

good to know its being worked on by someone more competent than me =)
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: request : building combo multiplier thing

Post by Hoi »

show the script?
Hacked
Posts: 116
Joined: 15 Aug 2008, 18:06

Re: request : building combo multiplier thing

Post by Hacked »

give order to unit? all i have is this
Spring.GiveOrderToUnit(Spring.GetSelectedUnits()[1],CMD.INSERT, {1, CMD.BUILD, CMD_OPT_INTERNAL, 11}, {"shift"})
i tried to get a t1 con to build an adv solar so i cut, pasted, and modified this line from the mexupgrader gadget in ba6.31

the spring api isnt like the .net api where everything is explicit
heres what i found in the syncedctrl wiki for giveordertounit parameters

anyone know what im supposed to put for params?
i also dont know how to add a button on the left

Spring.GiveOrderToUnit
( number unitID,
number cmdID,
params = {number, etc...},
options = {"alt", "ctrl", "shift", "right"} ) -> nil
"etc"? are you kidding?
idk, for me working with lua and spring is a little hard
perhaps a tutorial on making a button would be better than having to look through other luas

edit: i read the cmd section again after realizing there wasnt a build cmd. im still confused on how to build
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: request : building combo multiplier thing

Post by CarRepairer »

Does the mod you're playing have metal generators?
Hacked
Posts: 116
Joined: 15 Aug 2008, 18:06

Re: request : building combo multiplier thing

Post by Hacked »

its BA
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Re: request : building combo multiplier thing

Post by Acidd_UK »

lurker wrote:Well, metal makers are roughly free,
Not so, they cost a lot of E, which is critical in the early game...
Tim-the-maniac
Posts: 250
Joined: 22 Jul 2006, 19:58

Re: request : building combo multiplier thing

Post by Tim-the-maniac »

Hacked wrote:
Spring.GiveOrderToUnit
( number unitID,
number cmdID,
params = {number, etc...},
options = {"alt", "ctrl", "shift", "right"} ) -> nil
"etc"? are you kidding?
idk, for me working with lua and spring is a little hard
perhaps a tutorial on making a button would be better than having to look through other luas

edit: i read the cmd section again after realizing there wasnt a build cmd. im still confused on how to build
try cmdID = -unitDefID (the unit you want to build)
params = {x,y,z,buildfacing}
options = {"shift"}
Post Reply

Return to “Lua Scripts”