Page 1 of 1

[request] Hide/Unhide for buildlists

Posted: 11 Oct 2007, 00:31
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?

Posted: 11 Oct 2007, 01:07
by Forboding Angel
In retrospect, could a variation of this be done with AF's prerequisite Gadget?

Posted: 11 Oct 2007, 03:52
by j5mello
yes assuming you can hot load build lists with LUA

Posted: 11 Oct 2007, 05:22
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

Posted: 11 Oct 2007, 09:30
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.

Posted: 11 Oct 2007, 16:49
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.