Actor continues into next scene?

raze_struckraze_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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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

  • raze_struckraze_struck Member, PRO Posts: 141

    @tatiang said:
    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.

    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

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375

    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.

  • SocksSocks London, UK.Member Posts: 12,822

    @raze_struck said:
    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

    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 !

  • raze_struckraze_struck Member, PRO Posts: 141

    @Socks said:
    Job done !

    sweet, got it!

  • raze_struckraze_struck Member, PRO Posts: 141

    @Socks said:
    Job done !

    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.

Sign In or Register to comment.