Won't change scenes...

tjjunior21tjjunior21 Member, PRO Posts: 50
edited January 2015 in Working with GS (PC)

I'm relatively new to Gamesalad and decided to create a simple game. It only contains three scenes, an initial scene, game and game over. I have a button created on the initial scene that when clicked it takes the user to the game. However, in the game scene, when the actor collides with an object it supposed to end the game and switch over to the end of game scene. For some reason I cannot get it to switch scenes. I created a rule which stated when game over is true a timer of 2 seconds was supposed to switch scenes. Any suggestions on how to fix this would be great!! This is the last component of the game.

I thought of another way to potentially fix this.... can I add a button that only shows up when the game is over? When the button appears the user can click on it and take them to the next scene? Just a thought. Thanks for your help.

Also, should I have the switch scene with a specific character or create something new?

Comments

  • alexconsincalexconsinc Member Posts: 54

    Not sure what you mean… Is there any way you can record a video so we can see better?

  • jimletjimlet Member Posts: 2

    Or post a screen shot of your "rules" ?

  • GnarlyGnarly canadaMember Posts: 840

    What's EXACTLY triggering your game over (change scene?) Are the conditions for this rule actually happening??????

  • tjjunior21tjjunior21 Member, PRO Posts: 50

    Thanks for the reply.... essentially what I tried to do is create another version of flappy bird but with a fish. Just wanted to keep my first game simple and learn more of the features of GS before buying the pro version. When my fish overlaps or collides with an obstacle I have a change attribute to game over to true. I'll attach a few screen shots for my fish character. I'm not sure if I'm supposed to try and change the scene from a character or some other type of attribute.

    I'll label the images Part 1-5, which goes in the order I have them under my fish character. It's also worth mentioning that all the rules for parts 1-5 are under or part of rule 1.

    To answer your question Gattoman, mostly all the conditions for the fish character work except for the change of scene.

    I would like to post the screen shots but not exactly sure how. I only see two options at the top, one is for a link and the other for a image/file attachment. It's not letting me enter anything in the image/file field.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Only Pro members may attach files or embed images. You'll need to upload the image(s) to a file-sharing site and then post the links here.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • jimletjimlet Member Posts: 2

    Oops ! :o

  • tjjunior21tjjunior21 Member, PRO Posts: 50

    Since I'm not a GS pro member yet any other suggestions on how to correct the issue? When you try to change a scene to game over after actors collide should I do that from the actors themselves?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited January 2015

    It doesn't matter where you put that rule unless you are destroying the actor. Destroyed actors will not continue to fire their rules.

    I recommend posting screenshots of your rules. We can't really help you without seeing how you've set things up. If it's easier and you don't mind it being public, you can post a link to download your project file (.zip it first).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tjjunior21tjjunior21 Member, PRO Posts: 50

    Not having any luck uploading the images. Maybe a general question might help. When a game is over - let's say two actors collide and that causes the game to end. Looking at the actor itself, would you just create a new rule that says when game over is true change the scene? But it also gives me the option to say when game playing is false - isn't that the same thing as game over true?

  • tjjunior21tjjunior21 Member, PRO Posts: 50

    Or let me put my question in a different way. When the player dies and the game is over will the game automatically restart? This is where I'm confused and thought I needed to add another scene.

    I've tried testing this out on my android device but since I'm not a pro-member yet I wasn't able too.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    would you just create a new rule that says when game over is true change the scene? But it also gives me the option to say when game playing is false - isn't that the same thing as game over true?

    If you created booleans called game.playing and game.over, they can mean anything you want them to. The name of the attribute has no effect on what it does or how you use it. You could just as easily called them game.Whatever and game.Anything. So I don't know how you're using them but I guess the answer is yes, they could mean the same thing.

    Or let me put my question in a different way. When the player dies and the game is over will the game automatically restart?

    No. You can reset everything by using a Reset Game behavior or you can use a Reset Scene or Change Scene behavior. The important thing to know is that game attributes (aka global variables) do not reset when you use Reset Scene or Change Scene. So right before/above that behavior you have to manually change all necessary attributes back to their original values. For example, if you have game.score set to 0 and game.lives set to 3 then you would do:

    Change Attribute game.score to 0
    Change Attribute game.lives to 3
    Change Scene [menu scene]

    It's up to you whether you have a button, a whole scene, or an automated (e.g. timer) way of resetting the game. There's no requirement for any of those, specifically.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tjjunior21tjjunior21 Member, PRO Posts: 50

    It's still not working. Under my character I have when game over is true (I created a game over boolean under my game scene) it's supposed to begin a timer and after 2 seconds switch to the game over scene.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You can check the value of that boolean using a Display Text behavior or a Log Debugging Statement to make sure it actually changes to true.

    Upload a screenshot of your rules to a file-sharing site and then post the link here.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.