[request] Hide/Unhide for buildlists

[request] Hide/Unhide for buildlists

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

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

[request] Hide/Unhide for buildlists

Post by Forboding Angel »

Ok, well this is kind of complicated to explain but here goes...

In my mod there are 10 levels of units, 1-4 are simply weapons upgrades, 5-10 are chassis and weapon upgrades.

What I need is a gadget/widget/whatever that looks to see if my research station has been built. If the station has been built I need the gadget to hide all of the buildpics that were originally in the regular factories and replace them with a new set (specifically, lv5 units) of buildpics. It doesn't need to keep checking if the research station is still alive, as long as it's built once that is enough.


Halp?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

In retrospect, could a variation of this be done with AF's prerequisite Gadget?
j5mello
Posts: 1189
Joined: 26 Aug 2005, 05:40

Post by j5mello »

yes assuming you can hot load build lists with LUA
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

It can be done, you could also 'grey' the build buttons
as is done in the deployment script. You'll want to use
the AllowCommands call-in to make sure that no errant
build commands slip through.

Related call-outs:
EditUnitCmdDesc
InsertUnitCmdDesc
RemoveUnitCmdDesc
FindUnitCmdDesc
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Indeed my gadget would do that, however I suggest you instead use the RemoveUnitCmdDesc and the InsertUnitCmdDesc calls as trepan suggested otherwise there could be lots of grayed out icons.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

AF wrote:Indeed my gadget would do that, however I suggest you instead use the RemoveUnitCmdDesc and the InsertUnitCmdDesc calls as trepan suggested otherwise there could be lots of grayed out icons.
Actually only 5, and after I've thought about it a bit, I think it would be wise to leave the previous buildpics in there.
Post Reply

Return to “Lua Scripts”