Going back to a scene

ChiselbrainChiselbrain Member Posts: 25
edited January 2012 in Working with GS (Mac)
Lets say you set up 2 scenes, one for the inside of garage and one for the inside of the attached house. Is there an easy way to retain whats happened in one scene when I left it so when i go back to it everything was like it was when I left? For instance lets say at the beginning of the garage scene (beginning of game) I have GS place random actors throughout the scene and maybe the player drops some actors too if need be. I leave to the door actor which triggers the "house" scene and its the same as the in regard to actors I explained. If I walk back to the garage scene, I want everything to be as it was before I left it. Same for the house.

Lon

Comments

  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    edited January 2012
    Hey Lon,

    Yeah you just need to use Save and Load attributes to save the x/y coordinates and if they were spawned along with an interger attribute to go with it.

    So:

    When
    actor: larry is spawned
    change attribute game.larryspawned to 1
    save key: LarrySpawned Attribute: game.LarrySpawned

    Before these two scenes, on your very first one, have the load attribute to load the exact same key name and attribute as above. Make sure you put any Save attributes directly after what you want to save too.

    This is a start but you'd still need to save the x/y too. Hope that helps..
  • ChiselbrainChiselbrain Member Posts: 25
    Thanks for the fast response! That sounds good. What if I randomly spawn 5 Larry's using an actor that spawns Larry's every 1 second for 5 seconds? If they are the same actor how do I differentiate them when saving their positions?
Sign In or Register to comment.