quick adding, ending object

I have am a small problem I add an object with an empty but i limit the amount of objects using a property and the EXP controller I end that object with a key this all works well Here is my question when i add the object then end the object how come i can’t add the object i just ended? Example i press l to add and k to end when i try to press l again nothing happens, it should re-add that same object


You do not add the same object. I always get a copy of the object.

Have you checked that the emitting object still exist?

Not sure how i can that the emiting objects still exist in game play. I made a quick blend that has the same problem. All i really want to do is add the object (more of an option really) and end it but can add it
again if needed. Check out the quick blend maybe you can see what i did wrong



adding.blend (127 KB)

funny, you do not count the number of added Cubes, but try to track how many you already added. You change the property “Cube” from 1 to 0 when adding an object.

But when you remove the objects the property remains the same, preventing to add another object.

So you could add a key sensor “k” an let the property cube reset to 1 by an property actuator.

Or, use this one:
adding2.blend (134 KB)
It counts the number of objects with the same name as the objects to be added by the actuator.
You need to add a property “maxObjects” to determine what the maximum of objects to add is.
You can even change this property during the game.

I hope it helps