Hi all!
I recently started working with GameSalad and making a Super Mario -style platformer game. I'm gradually getting the hang of everything and things are starting to work out.
One thing I can't figure out, however, is how interpolation works with resetting the scene.
In my scene I have a rule that when the player passes a horizontal point in the scene (jumps over a hole in the ground with water), the scene's background color interpolates to a different one. It works nicely, however if the player dies after this and the scene is reset, the interpolation happens again at the beginning of the scene.
This is how I did it:
Gameattribute PlayerX is constrained to the player actor's position X.
When PlayerX is bigger than a certain X point, a boolean scene attribute called "LeftHome" turns true.
When "LeftHome" is true, the background color interpolates.
In the scene's initial state "LeftHome" is of course false (I'm not sure if resetting a scene should reset this?).
I have also tried a rule in my "scene control" actor that "LeftHome" is changed to false, figuring it would change it in the beginning of the scene. Also I made a rule that when the actor dies it changes "LeftHome" to false.
But nothing prevents the color from interpolating again when the scene restarts.
Is there something I don't understand?
Thanks for any help!
Jimmy