View Single Post
Old 09-16-2003, 02:06 PM   #1 (permalink)
CodeCat
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default Toggle-able upgrades

I want to do this: you have a building (power drain=-15) with a radar upgrade button, but initially its inactive. You click the button and the radar is activated, but the power drain also increases to -19. Then you click another button and radar is disabled again, and drain drops back to -15. So you can choose whether you want radar or not, but you can save the power if you choose not to have it.

I have three suggestions on how to do this (but don't know if either of them are possible, so that's what I'm asking):

- 2 buttons, one of them just creates an upgrade object (which provides radar and drains power) and then the other one destroys it. Creating the object is easy, but how do I destroy it with the other button?

- 1 button, which uses the overcharge logic. You click it and the building goes into overcharge mode, which drains power (via ExtraPower = -4). But how do I get this to grant the radar upgrade at the same time?

- 2 buttons, one of them activates an upgrade, which drains power though use of a powerplantupgrade. It also triggers the radar upgrade. But how do I use the other button to remove the upgrade from the building?

Anyone know if any of these are possible, and how?
CodeCat is offline   Reply With Quote