What would be the best way to get the score from a spawned projectile of an enemy unit hitting you (or other units) passed back from the projectile to the enemy that spawned it. There are more than 1 enemy and they would all share the same name being spawned units themselves.
Im thinking i might need to rename each enemy on being spawned and then when spawning the projectile pass that unique name to it so that it can pass back the information to that particular unit or is there another simpler way?
Thanks, you understood me correctly! One of the BGE users on facebook told me I could store a reference to an object and I implemented it how you suggested
All this time I’ve been searching the scene for object names I need or using message! Facepalms
Relying on object names is not efficient. It means you want to start a search (searching is always slower than knowing). So keeping the reference (= knowladge) is a good and efficient way.
This way the wish to rename objects is suddenly irrelevant .