Add object. How to keep track of them?

Okay this problem I have been trying to figure out for a very long time.

When you add an object using the edit object actuator, how do you keep track of them and access there data?

If you’re using python you can use objectLastCreated:


addObjectActuator.instantAddObject()
newOb = addObjectActuator.objectLastCreated
 
# Then you can use newOb just like you would the owner object:
print newOb['someProperty']
newOb.worldPosition[0] = 10
# and so on...
 

Oh I did once but not for this reason lol I can’t believe I didn’t think of that.

WoW thanks a lot battery, you’ve saved me time mate

:smiley: No worries, happy to help.

I’d personally add all new objects inside a dictionary. That’s probably the easiest way to keep track of all your objects.