How do I Create a pop up that show only once?

Get help using Construct 2

Post » Sun Jun 01, 2014 8:17 am

So here is the condition

I want to create a pop up to teach how player react to the objects in the game, something like tutorial or the how to in the game and this pop up tutorial has a tick for player to choose "never show it again to me" or something like that

So the question is, how to let the game system know that player already tick the option and in the next game start up, the game don't need to show the tutorial again

Btw, I'm developing the game to be exported to cocoonjs
Thanks
B
8
S
2
Posts: 203
Reputation: 1,169

Post » Sun Jun 01, 2014 8:35 am

Hey ijoin, there are several ways to do this..
a quick way is to use instance variables

presuming that your popup is an object...goto its properties and add an instance variable
make it a Boolean and then give it a name like "Playe_ticked" or something that you recognise

Then you can add an extra action to the Player clicked on "never show it again for me"
The action would go anywhere before the popout action that you should already have for the popup..
and it should trigger the Boolean instance variable that you just made for the Popup object and set the BOOLEAN to true...

then in your other condition that makes the popup initially trigger you should place another "Condition"
that checks if the Boolean has been triggered or not

this way the popup object event will not occur if its been ticked by the player..but should trigger if it hasnt

Hope that made sense..
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Sun Jun 01, 2014 9:03 am

mystazsea wrote:Hey ijoin, there are several ways to do this..
a quick way is to use instance variables

presuming that your popup is an object...goto its properties and add an instance variable
make it a Boolean and then give it a name like "Playe_ticked" or something that you recognise

Then you can add an extra action to the Player clicked on "never show it again for me"
The action would go anywhere before the popout action that you should already have for the popup..
and it should trigger the Boolean instance variable that you just made for the Popup object and set the BOOLEAN to true...

then in your other condition that makes the popup initially trigger you should place another "Condition"
that checks if the Boolean has been triggered or not

this way the popup object event will not occur if its been ticked by the player..but should trigger if it hasnt

Hope that made sense..


Thanks for your input mystazsea
What if I closed my games? How to store that true condition?
B
8
S
2
Posts: 203
Reputation: 1,169

Post » Sun Jun 01, 2014 9:12 am

ijoin, that data can be saved if you use the built in save function

but you would need to tell construct 2 to save that data just before the programm closes
and on reopening you should make sure that it checks the data and loads it

You should read up all about saving data here
https://www.scirra.com/tutorials/526/how-to-make-savegames

https://www.scirra.com/manual/120/webstorage

hope that helps
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Sun Jun 01, 2014 9:14 am

Message: ijoin can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
mystazsea wrote:ijoin, that data can be saved if you use the built in save function

but you would need to tell construct 2 to save that data just before the programm closes
and on reopening you should make sure that it checks the data and loads it

You should read up all about saving data here
https://www.scirra.com/tutorials/526/how-to-make-savegames

https://www.scirra.com/manual/120/webstorage

hope that helps


Oh right, that helps a LOT
Thanks for the useful input :D
B
8
S
2
Posts: 203
Reputation: 1,169

Post » Sun Jun 01, 2014 9:45 am

No worries ..glad to help out...
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Sun Jun 01, 2014 2:18 pm

Toying around with webstorage and i stil can't make it work :(
B
8
S
2
Posts: 203
Reputation: 1,169

Post » Sun Jun 01, 2014 2:50 pm

Never mind, I got it working
Yay! :D :D
B
8
S
2
Posts: 203
Reputation: 1,169


Return to How do I....?

Who is online

Users browsing this forum: luck1210, R0J0hound and 1 guest