help would be appreciated! problem with scene

Pennez-GamesPennez-Games Member Posts: 107
edited July 2012 in Working with GS (Mac)
ok so im making this game, as you can probably tell, well heres the problem, in the level in the game, if you die, or loose the level, you go back to the main menu but when you click play (to play the level again) the game just continues off from where it left off, i tried to fix this, but i couldnt, please help! if i can get this fixed then i will have my game done soon. please help!

here is a video of the problem:

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    edited July 2012
    Dude, couple of tips;

    Write a descriptive thread title, simply help is rubbish! Same with your last thread title of need help.

    Elaborate on your problem ... what do you mean the game continues off? Is this the score? Number of lives? what position you was in when you died? What?

    I would assume you are changing game attributes during runtime and never resetting these values!
  • HapiappsHapiapps Member Posts: 373
    Whats supposed to happen when you click play? Start from beginning?
  • 3itg3itg Member, PRO Posts: 382
    Find your rule that controls how / when your character dies...
    and do something like this example:
    When character health = 0, spawn actor "Game Over"
    Then in the game over actor,
    When actor receives touch, reset scene.
  • Pennez-GamesPennez-Games Member Posts: 107
    Whats supposed to happen when you click play? Start from beginning?

    ok here is a video of the problem.. is there a way to fix this?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Forget the video dude you need to show your code.
  • Pennez-GamesPennez-Games Member Posts: 107
    Forget the video dude you need to show your code.
    I just want to be able to reset the scene there is loads of code
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Hey,
    when you reset the scene make sure you set all the attributes back!
    When I read that "when you click play again all is where it was left" I immediately thought that you don't set the attributes back!

    Alex
  • beefy_clyrobeefy_clyro Member Posts: 5,394

    I would assume you are changing game attributes during runtime and never resetting these values!
    I have already given you the answer here!!!

    When its game over you'll be changing a game attribute to say game over is true or something to that effect. Put a rule on your play button from the main menu that says;

    When touch is pressed

    Change attribute game.gameover (or whatever you've called it) to false.
    Change attribute game.currentscore (or whatever you've called it) to 0.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I just want a million dollars it not that easy as you make it sound.
  • Pennez-GamesPennez-Games Member Posts: 107

    I would assume you are changing game attributes during runtime and never resetting these values!
    I have already given you the answer here!!!

    When its game over you'll be changing a game attribute to say game over is true or something to that effect. Put a rule on your play button from the main menu that says;

    When touch is pressed

    Change attribute game.gameover (or whatever you've called it) to false.
    Change attribute game.currentscore (or whatever you've called it) to 0.
    actualy im not using any attributes for the game over, i am simply just making a rule when actor collides with game over, interpolate game over to center of screen then change scene to main menu, thats it. but i will play around with some attributes, i dunno how to do this but.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    You need to reset any attributes back to their starting point in your change scene rule before the change scene behavior.
  • Pennez-GamesPennez-Games Member Posts: 107
    You need to reset any attributes back to their starting point in your change scene rule before the change scene behavior.

    ok i made a rule when game is over
    change attribute "highscore points to 0" so it set it to zero,
    the way my highscore works is,
    timer: every 1 second do -> change attribute "game.highscore" to ->"game.highscore+1"

    thats how the whole highscore works, so how would i make it so this resets every time you restart ect..?
  • RPRP Member Posts: 1,990
    edited July 2012
    Alright, just to be clear we are still trying to get the score to reset after you lose the round correct?

    If you have a proper score attribute created, on your scene/level you just need a simple change attribute game.score to: 0 You can place this on a generic actor off screen, or in the background. It just needs to see this each time it loads that level, so that it is the first thing it does. Since we don't know how the rest of your game is constructed, you may tun into more issues. It looks like a "endless-dropper", so the method I mentioned as well as methods @beefy_clyro and @FryingBaconStudios mentioned should work. If it does not, there is something else going on and the best way for us to help is a screen shot of your code. It will tell us if something is amiss.
Sign In or Register to comment.