View Single Post
Old 09-16-2003, 02:19 PM   #2 (permalink)
DJRowley
Senior Member
 
Join Date: Mar 2003
Location: UK
Posts: 676
Send a message via MSN to DJRowley
Default Re: Toggle-able upgrades

Quote:
Originally Posted by ImmoMan
- 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?
You could make it so the upgrade object has an armour type only damageable by one damage type. The other button creates an object with a lifetime of 10 or something which fires a weapon with that damage type using FireWeaponWhenDead. You would also have to add the same FireWeaponWhenDead behaviour to the building to kill theobject when the building dies. Alternatively, if you use the drone code you could set it so it dies when the building dies anyway. You should use the ConflictsWith thing so that the 2nd upgrade can only be built when the first one is. Hope this helps. I thought of it a couple of days ago for something but i can't remmber what is was now........
DJRowley is offline   Reply With Quote