About to bang head on keyboard

bluebyu25bluebyu25 Member Posts: 500
edited November -1 in Working with GS (Mac)
This has been my two day absolute headache!! Last two days of development spent on trying to figure this out.

I need to reset AND change a scene, and apparently it is not feasible in the physical dimension that I occupy lol. I need TO LEAVE the gameplay screen to go to the highscore scene, but I also NEED TO RESET the gameplay scene so it is fresh for when you try again.

I could reset the whole game, but seriously this has to be easier than I am making it. I've tried boolean values, reset gameplay attributes (i.e. making the retry button change a value, had an actor in the gameplay scene that reset scene when reset gameplay scene integer >0)

GS community if I ever needed you its now!!!

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    In your gameplay scene, have an actor (let's call it 'RESTART') that resets all of the attributes.

    For example:

    Change lives to 3
    Change shields to 10
    Change enemieskilled to 0
    Change score to 0

    etc etc

    Then, on your highscore screen, in your 'retry' actor, simply have:

    If touched
    Go to gameplay screen.

    This will go fresh to your gameplay screen and pick up the variable changes in your RESTART actor.

    Hope that helps!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • bluebyu25bluebyu25 Member Posts: 500
    But wouldnt I have to set a condition for the "restart actor" to appear? Because if I created "restart" actor I couldnt just have him sitting off scene could I? It would be constantly resetting the atrributes. What rule should I have to have the acotr change all those attributes?
  • quantumsheepquantumsheep Member Posts: 8,188
    No - changing attributes happens once.

    So you could definitely have it off-screen.

    At the start of the level, those attribute changes will fire off immediately. You're then free to have them change as you see fit (as in, get hit, lose 1 life etc).

    Cheers,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • bluebyu25bluebyu25 Member Posts: 500
    This sounds like it will work! Trying now...

    Im getting excited. You have no idea the tricks I have been trying. I didnt know changing attributes happens once, so your logic makes sense. I will always remember my first roadblock in gave development, bc this was it!

    Heres to hoping this works....ill let you know in 5
  • quantumsheepquantumsheep Member Posts: 8,188
    *holds onto something*

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • bluebyu25bluebyu25 Member Posts: 500
    It allmoooost works!

    weirdest thing is.....when I press "retry" the first time...my game over is still there and then it takes me back to highscore. But when I press it again...it works perfectly like it should the first time.
  • quantumsheepquantumsheep Member Posts: 8,188
    What else is going on in your retry button?

    Also, are you using 'pause' to go to different scenes at all?

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • bluebyu25bluebyu25 Member Posts: 500
    My retry button just says: when touch is pressed---> change scene----> game play''

    Yes, I have a pause button that when pressed goes to a pause screen.

    I dont know why my game over is showing up, since it should only pop out if the misses=3. I made a display text actor to see if my misses werent resetting right but they are. Its almost more agonizing being so close now!

    By the way, thanks for the help!
  • quantumsheepquantumsheep Member Posts: 8,188
    No problem.

    You might shift those rules that reset stuff to the 'retry' button - change the rule to:
    If button is touched

    reset stuff

    Timer - after .1 seconds
    Change scene to gameplay scene.

    That might work, though it makes no sense to me why you're having trouble with it the original way I said!

    Good luck!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • bluebyu25bluebyu25 Member Posts: 500
    I am right there with you.....it should work just the way you said it makes no sense! Add to the fact that it does work every other time you press it....bizarre! I am going to try your suggestion but if it doesnt work would you mind if I zipped my gamefile over to you and have you look at it? I am not sleeping until I get this fixed!
  • quantumsheepquantumsheep Member Posts: 8,188
    Well, I *will* be sleeping I'm afraid - it's almost 5am here!

    I hope it works!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • bluebyu25bluebyu25 Member Posts: 500
    IT WOOOOOOOOOOOOOOOOOOOOOOOOORKKKKKKKKKKKKKKKKKKKKKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Quantumsheep......you are definitely going under my credits!!!
  • quantumsheepquantumsheep Member Posts: 8,188
    Awesome!

    (I hope they're not heavy!)

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • bluebyu25bluebyu25 Member Posts: 500
    Well here in Missouri it is only just past midnight....so get some zzzz's. By the way, my game is/will be called Tap Them.....in a few weeks I'll announce it in the "announce your game" part of the forum but look for it. Because as of five minutes ago you are on page two of the credits as follows:

    Quantumsheep:
    Thank him next time you hit "retry" and strive for a better round!
Sign In or Register to comment.