Reset Scenes from Different Scene?

AMoonAMoon Member Posts: 16
edited November -1 in Working with GS (Mac)
I want to reset scenes 1,2,3 from scene 4 is this possible? I thought about an attribute scene rest set to 0 then a rule in that scene if scene reset = 1 the reset scene, but this only works when you enter the scene. Can it be reset without entering each scene?

Comments

  • TheGreenHornetTheGreenHornet Member Posts: 3
    I'm seeing my scenes reset every time I switch scenes. I move an actor on 1 scene, switch to another scene, back to the original scene, and the actor is back in it's starting position. Is there a way to not reset the scene when I switch scenes? I want the actor positions to persist between scene changes.

    It would be nice if they could persist between launches of the game too, but I guess that's another topic.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi AMoon
    AMoon said:
    I want to reset scenes 1,2,3 from scene 4 is this possible? I thought about an attribute scene rest set to 0 then a rule in that scene if scene reset = 1 the reset scene, but this only works when you enter the scene. Can it be reset without entering each scene?

    Not really, I don't think; the way you've done it is the only way, as far as I know. I'm curious to know though, why this method worries you; it seems perfectly natural that if you wanted to reset a scene, then do it at the opening of the scene. But also, as TheGreen Hornet says, revisiting levels resets them automatically, without the need for a Reset Scene. I guess that Reset Scene is used only if you're repeating a scene your in.
    TheGreenHornet said:
    I'm seeing my scenes reset every time I switch scenes. I move an actor on 1 scene, switch to another scene, back to the original scene, and the actor is back in it's starting position. Is there a way to not reset the scene when I switch scenes? I want the actor positions to persist between scene changes.

    It would be nice if they could persist between launches of the game too, but I guess that's another topic.

    You'll have to use Save Attributes as well as Load Attributes to make sure things were as you left them. I suppose that the best time to update the attributes would be with a Save button (there's no way to interrupt an iPhone/iPad quit as such). The Save attributes in its Rules. Then to carry on from where you left off, in a Continue Game button, for instance, you'll need to load in the attributes from the saved ones, using Load Attribute. This would include actor positions, etc., providing you've same them as well.

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • TheGreenHornetTheGreenHornet Member Posts: 3
    I have to save and load attributes to remember actor locations between scene changes too? Seems like the scene should remember it's state so I can switch between scenes and pick up where I left off. :-(

    Should I submit that as a feature request?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi, each scene returns to its initial state of attributes if you ask it to reset the scene, although I think this wouldn't include game attributes; these would be their new values if they have changed; though I'm not certain about that.

    But even when not using Reset Scene Behaviour, but returning to a scene from another one, it'll still start at the beginning of the scene, with your actors in their initial positions (but definitely any new game attributes values). Unless you're using a couple of game attributes each, to track the x,y coordinates of your actors constantly, which would use up a lot more processing power during the game, the returned-to scene won't "know" the last position of them.

    So the only way is to use 2 Save Attributes (for x and y) for each and every actor who position you want for them to start from where they last were, as Save Behaviours upon leaving the scene; and before entering the scene again, you need to Load Behaviours for them.

    It's a lot of work to do this, I realise. You'll also need Save/Load Behaviours for whether or not a baddie has been destroyed or not. Or it's alpha changed; or stopped rotating, etc., etc.

    I reckon it's possible to write a Behaviour called Save Level State for instance (although I hasten to add I wouldn't even know where to start to do that) but it'd be complex, I reckon, and something that Gendai probably wouldn't consider doing, at least for quite a while. I think that Save Attribute and Load Attribute isn't going to be replaced sometime soon, but you could submit a request, if you like. You can only but try!

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • TheGreenHornetTheGreenHornet Member Posts: 3
    Can you point me to an example of doing this that I might reproduce it?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I don't know of any example of saving and loading using those behaviours, I'm afraid. I will need that for my game as well and intend to do a test first, but I don't know when that'll be.

    And even if/when you do find an example, if you don't know: be aware that saving and loading of attributes won't work on the Mac, only in the GS Viewer or on an actual iDevice.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • GLGAMESGLGAMES SingaporeMember Posts: 988
    Sounds to me the reset scene is sort of like a replay button for that round alone if you failed to achieved the goal for what ever specified.

    But then again for Greenhornet, you are talking about moving in a big area which needs to go to a different scene in order to continue the journey i presume?That's abit tricky but if you were able to create a rather large area for one scene and slit them up in different parts and use a camera + character x,y interpolate to the next segment of that scene so the whole thing should not reset as it's still the same scene just another area of the scene.
Sign In or Register to comment.