Pause type scene?

triton13triton13 Member Posts: 161
edited February 2012 in Working with GS (Mac)
Hey guys, I have a quick question. How can I make it so when I start up my game, it has a "pause menu" so the scene doesn't start immediately and I touch the screen to start. I tried putting a Pause Game behavior in and then when the screen it touched, Unpause Game. When I did that it was all glitchy and everything. Any help would be much appreciated. Thank you =)

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Make an attribute called startGame and have it set to false.

    Make an actor, drag it over the whole screen, and set the alpha to 0 so its invisble(only do that if you want it to be invisble) Then have a rule in it when touch is pressed, change attribute startGame to true.

    Then put all your game behaviors in rules when attribute startGame=true, then they wont start till after you touch the screen.

    Cheers
  • triton13triton13 Member Posts: 161
    Okay, I understand up until the last sentence. How can I get all my stuff just pause. Do I have to get all my other attributes and have them stop somehow until startGame=true? If so, how do I go about doing this. Please excuse how big of a noob I am but I am learning. =P
  • 921creative921creative Member, PRO Posts: 140
    Yes. Just select all of your rules in the scene you want to pause, then click Create Rule. Then in THAT rule, select when Attribute startGame = true. Then, none of your rules will execute until startGame is true.
  • triton13triton13 Member Posts: 161
    I have a bunch of objects moving around and I don't know how I would get them to stop. No attribute is making them move or anything like that, so I can't tell it to stop.
  • 921creative921creative Member, PRO Posts: 140
    edited February 2012
    Edit the objects' (actors') prototype. Make a rule that changes attributes Motion.LinearVelocity.X, Motion.LinearVelocity.Y, and Motion.AngularVelocity to 0 if startGame = false.
  • triton13triton13 Member Posts: 161
    I understand what you're saying and it works but I have gravity on and it drops my players. How can I get my gravity to turn on when startGame = true?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited February 2012
    Dont use scene gravity, use accelerate behaviors in a down direction to act as gravity. And put those in the rule when startGame=true
  • triton13triton13 Member Posts: 161
    Okay, I tried all of this and it works with one of my actors but the others, it does not. I have the same rule and everything in my other actors but like I said, it only works with one of them. =(
  • triton13triton13 Member Posts: 161
    Alright, I got it to work but I have two problems now. 1) When I click and everything starts up, how can I get the "Pause Screen" to go away? 2) When I use accelerate for gravity, it doesn't work the same. If my character moves, it go a different way. I want it to bring them straight down like gravity. Not going sideways and upward and all other ways.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    You need to have the accelerate down behaviors relative to scene, not to actor. And in the pause screen have a rule when attributre startGame=true, change attribute self color alpha to 0
  • triton13triton13 Member Posts: 161
    I changed it to scene but now some of my actors aren't moving until another actor hits them. Also, I made it so when it's true, it changes to Alpha = 0 but nothing happens at all.
  • triton13triton13 Member Posts: 161
    Anyone please?
Sign In or Register to comment.