Originally Posted by
Rotational_aspect
Ok, here is the basics for the script:
There are buttons that when pressed send messages that create the object in the message: so for example, a message that says square will spawn a ship called square. This is done for all parts (i.e. one button will send several messages that generate the ship, weapons and other bits)
At the same time, the button also sends a message to destroy any existing objects (so by pressing several times you do not get several copies of ships). This is done by assigning each ship an ID at creation time and when a ship receives a self destruct message with a number that matches its ID, it ends itself.
The best bit is that none of the script actually calls any objects directly (no dependencies), so I could in theory have an unlimited set of buttons that generate any combination of ship and weapon from the pool of available parts. All I need to do is type the ship / weapons name into a message sensor.