Trying to optimize Auto Reclaim/Heal/Assist

Trying to optimize Auto Reclaim/Heal/Assist

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

Moderator: Moderators

Post Reply
MoriturusMortus
Posts: 1
Joined: 23 Oct 2012, 10:52

Trying to optimize Auto Reclaim/Heal/Assist

Post by MoriturusMortus »

I am trying to optimize the "Auto Reclaim/Heal/Assist". While using this lua script, builders tends to begin to support factories or buildings which are getting build, and got stuck with it, when I ran out of metal. So it would be nice if the script check if enough metal and energy is in storage and if not the builder stops supporting and begin to reclaim or begin to heal damage units. But I like to have this feature only for builders which were ordered by the specific script to support and not all other builders I own. Is there a way to track who give the last order? It would be enough to know the specific time the last order was given.
And I have some problems to figure out how the " CMD.FIGHT" command works, how is it decided what the builder do (reclaim/Assist/heal)?
Broker
Posts: 156
Joined: 02 Jul 2012, 13:16

Re: Trying to optimize Auto Reclaim/Heal/Assist

Post by Broker »

MoriturusMortus wrote:I am trying to optimize the "Auto Reclaim/Heal/Assist". While using this lua script, builders tends to begin to support factories or buildings which are getting build, and got stuck with it, when I ran out of metal. So it would be nice if the script check if enough metal and energy is in storage and if not the builder stops supporting and begin to reclaim or begin to heal damage units. But I like to have this feature only for builders which were ordered by the specific script to support and not all other builders I own. Is there a way to track who give the last order? It would be enough to know the specific time the last order was given.
And I have some problems to figure out how the " CMD.FIGHT" command works, how is it decided what the builder do (reclaim/Assist/heal)?
I have a script that works only with certain builder . selection by name.
Post Reply

Return to “Lua Scripts”