add background scene + remove scene actuator

Hi, in an attemp to preload the levels of my game (still just a test level), i made an object in my loading scene to execute that code:

add_scene.scene='test_level'
remove_scene.scene='test_level'
cont.activate(add_scene)
cont.activate(remove_scene)

(Obviously that code is only part of the full script)
Being add_scene a scene actuator of the ‘add background scene’ kind, and remove scene a scene actuator of the ‘remove scene’ kind.
The thing is that looking in the system console, i get this message:
'Warning: scene test_level does not exist, not removed! ’
Which is kinda strange, as the add background actuator actually added it. (i can tell cause the framerate is lower and the sounds overlap)
So there’s any way to remove a background scene?

Try this:

add_scene.scene='test_level'
cont.activate(add_scene)
remove_scene.scene='test_level'
cont.activate(remove_scene)

So you want to remove the scene and re-add it as background?

Maybe you mis-spelled the name of the scene? It is case sensitive.
Or you do not have “test_scene” running. So it is not possible to find it.

BTW. it does not matter in which order you activate the actutators within your python code. They are executed in the order they appear in the GUI from top to buttom.

[edit]
You can’t remove a scene that you just added, the scene should be running already. You can remove it within the next frame:
frame f+0: add
frame f+1: remove

the same with adding:

frame f+0: remove
frame f+1: add

I thought that activating the actuator before geting the scene will help. Looks like it wont.

Thanks monster! I think that kind of things should be told in the python API, cause i was looking at it to make the code and you see what happend :stuck_out_tongue: