test if overlay scene exists

I am using an overlay scene to display player item counts (lives left etc). In the console I receive a warning :

scene score already exists, not added !

This appears when the player dies and I restart the scene.

What I would like to do is test if the overlay scene exists and only add if required. I am familiar with getCurrentScene. Is there a way to get a list of all scenes i.e getSceneList ??

I dont know what you mean and if your trying to get an invetory just use overly scene.

Hello

If there’s one way that should be around here:
http://www.blender.org/documentation/pydoc_gameengine/PyDoc-Gameengine-2.34/KX_SceneActuator.KX_SceneActuator-class.html

Good luck :slight_smile:

Sounds like all you need to do is make it remove the overlay scene when u die before restarting.

Thanks for the replies. So the answer is no you can’t test for an overlay scene using python.

To Siegel:

I have thought of a couple of work arounds. For my game I think the simplest will be to reposition the player to the start position. But removing the overlay scene will be needed in a couple of situations.