How do I show a msg when leave the game

Get help using Construct 2

Post » Wed Apr 23, 2014 3:48 pm

Is there a way to show a message when the play decides to leave the game?

That will help in case someone is leaving the game by mistake
B
116
S
48
G
24
Posts: 401
Reputation: 22,207

Post » Wed Apr 23, 2014 6:11 pm

mind you, i've only recently started learning construct 2 so i might not be 100% correct or efficient. there should be multiple ways of doing this.

1. create a new layout
2. if you don't have an exit button on the layout of the game, add one
3. in events, set the exit button when clicked, set to the new layout that you just created and also add an event that sets the time scale to 0 (this basically means that the game is paused)
4. on that new layout, put your "are you sure you want to leave" message there
5. create 2 buttons on the layout, one for leaving the game and one for resuming the game
6. for the events, you want to set the 'leave button' when clicked, set to the layout where you want the player to go to
7. set the 'resume button' when clicked, set to the layout where the game is and add an event that sets the time scale to 1 (this event resumes the paused game)

sorry for my really bad instructions :S hope it helps
B
5
Posts: 26
Reputation: 283

Post » Wed Apr 23, 2014 6:24 pm

@notalkingplz That's not what I meant.

I need to show a message when the player tried to leave the game (go back to android home screen) not the gameplay (the actual play).
For example, when you are playing Candy crush and you try to leave the game( go back to android home screen), you will get a message asking if you want to leave or stay. That's what I need.
B
116
S
48
G
24
Posts: 401
Reputation: 22,207

Post » Wed Apr 23, 2014 6:34 pm

jogosgratispro wrote:@notalkingplz That's not what I meant.

I need to show a message when the player tried to leave the game (go back to android home screen) not the gameplay (the actual play).
For example, when you are playing Candy crush and you try to leave the game( go back to android home screen), you will get a message asking if you want to leave or stay. That's what I need.


ahh i see what you mean. i have no idea how to do that. i hope someone can answer your question
B
5
Posts: 26
Reputation: 283


Return to How do I....?

Who is online

Users browsing this forum: ezgaming420, JaredX and 13 guests