Actor continues into next scene?
raze_struck
Member, PRO Posts: 141
Hey guys, Is there any way to have an actor continue onto a next scene. Lets say they are running and i want them to keep going without having to respawn them into my second scene. Any suggestions?
Comments
Sure. At the end of the first scene, change a game attribute for each value you want to continue to the next scene (e.g. Velocity, position, etc.). In the actor, change it's velocity and position to those game attributes before doing anything else.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Sorry tatting, Im not following you too well. So basically In my case I would just need the linear velocity x and self position x to move into the next scene I guess, but I'm still kind of confused as to how you would go about it
You can't just continue it into the next scene. You would have to spawn them in or have them laid out before. You would use the attributes that tatiang said to save to mimick the same conditions as the previous scene. You would only have to worry about the scene loading times.
Need Help? Email Me | Templates | Full Game Source Code
Make some game attributes to store these values - for example HeroSpeed, HeroPosition . . . . then at the point where the first scene ends . . .
Change game.HeroSpeed to linear velocity x
Change HeroPosition to self position x
. . . ok, so now the two attributes HeroSpeed and HeroPosition just had the hero's final speed and position copied to them . . .
So, now we jump to the next scene.
First thing to do is to load these values into the hero . . . so . . .
Change self.linear velocity x to game.HeroSpeed
Change self position x to game.HeroPosition
Job done !
sweet, got it!
might be tricky though, because I am able to backtrack in my game. You can go from scene 1 to scene 2, and then go backwards.