Reset problems with scenes...

delorianhayzedelorianhayze Member Posts: 55
edited September 2012 in Working with GS (Mac)
Hey all, I have a game where the main character jumps over randomly created/timed obstacles. When the scene changes, the previous scene's timer and spawning times come through to the present scene (which I don't want). I have an actor in each scene that says AT START OF LEVEL (set x y z, etc.- i.e. a bunch of change attributes). And yet I'm still having troubles. It appears that a reset scene would help but I don't know how to implement that since I don't want a reset button. Am I missing anything here? How can I have the start of each level say, RESET ALL VALUES. I thought I did that with the change attributes. Is the solution a timer? Perhaps saying AFTER .1 SECOND CHANGE ATTRIBUTES X Y Z.? Any help would be appreciated thanks so much!

Comments

  • 3itg3itg Member, PRO Posts: 382
    edited September 2012
    Make boolean game attribute. we will call it game.reset
    On your actor, make the first rule a "change attribute" that changes your boolean to false.
    Now make a rule that says when game.reset = true change "bunch of change attributes".
    put that rule wherever you want.
    Now you can make a Rule that will change that to true, when it executes, the list of attributes will all change.
    so instead of "when health = 0, change scene or reset scene"
    you would use "when health = 0, change game.reset to true"

    Another way, would be to use all scene attributes, and the reset scene behavior.
  • delorianhayzedelorianhayze Member Posts: 55
    Youve been very helpful. Thank you so much. I'm going to try that out and see if it addresses my problem. Again, many thanks!
  • 3itg3itg Member, PRO Posts: 382
    edited September 2012
    For some reason, you are the guy who asks who asks the all the same questions I had...
    Glad to be of some help to someone.
    Now if only I could find answers to some of my questions :(
  • delorianhayzedelorianhayze Member Posts: 55
    Haha! Well perhaps I can be of some service. Shoot over the question.
    Also your suggestion helped to a certain capacity, but I'm still having a few problems- especially with timers. Any suggestions on that? And again, shoot over your questions!
  • 3itg3itg Member, PRO Posts: 382
    Don't use timers, use rules instead.
    Sounds like you want to use scene.time
    You will need to "unlock" the prototype in the scene to access it.
    But if you base a timed rule on it, it will definitely reset after a "reset scene" behavior.
Sign In or Register to comment.