Help with unusual intro and saving/recognizing name

Get help using Construct 2

Post » Thu Aug 04, 2016 7:08 am

At the start of my game i have a splash screen. When the splash screen fades out you're taken to a set of doors that have a power button.

Once pushed, the power button separates , the doors slide open, you are met with a voice over that asks you to sign in.

What i would like to do is, if the player is new, the voice over gives them a quick intro and then takes them to the main menu. If it is a returning player, the voice over welcomes them back and takes them to the main menu.

I know how to trigger the voice over, but i do not know how to save a name and check if that name has been saved before.

A huge thank you for anyone giving examples on how to implement this.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Thu Aug 04, 2016 9:30 am

I assume with this kind of logic you will be making use of save games :
https://www.scirra.com/tutorials/526/ho ... -savegames

Then to set this up I would automatically load the saved game on start. I would make use of 'On load failed' which returns if there is no saved game present.

'On load failed' - 'Mark as new player'.
'On load complete/succesful - Mark as returning player'

A second way of doing it could be to ghost save the same early on and have a global variable or identifier, which changes based on how late they are in the game and whether you now consider them a new or returning player i.e. beyond an intro movie or completed the first level, whatever you want. In this case, you could just load the game automatically on game start and state the following :

If global variable = 0 - Mark as new player
If global variable = 1 - Mark as returning player

Then play the appropriate intro movies.
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

Post » Thu Aug 04, 2016 4:44 pm

Thank you for the reply, plinkie.

Not really like that example, but close. Its a form of asteroids, on steroids. The player starts a game from the beginning. Let's assume they clear 5 waves, then they quit the game.

When they return to play again, they sign in: "Welcome Back" is played.
If it's a new player: "Hello. Please sign in" is played.

What i need the game to remember from them singing in is:
Their name

Their score (after each wave is cleared), if they do not finish clearing a wave, their score is not recorded. This will also allow for promotions (awards).

Their options. and i think i will need a lot of variables for this A player will be allowed to choose several things: the controls - normal or compact, left or right hand. Also, if they have purchased the full version, they will have a total of 4 ships, along with 3 shields. These shields can be swapped from ship to ship for different combinations.

So i guess the post title didn't do the need justice. But i just wanted to start with that. There's a lot of logic that the game needs that i don't fully understand yet. But baby steps.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Thu Aug 04, 2016 5:48 pm

If you want to save the game state as if it was something like a top down shooter and you were mid-level then that save games link will come in useful, it will save the state of the game. If it's only ever going to be little bits of data like their name and score then you can make use of local storage https://www.scirra.com/manual/188/local-storage. This will remember certain bits of information for when you load the game again on the same device.
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

Post » Thu Aug 04, 2016 6:13 pm

Thank you again for the reply.

Yes, it is a topdown shooter. If they are returning, it should load their score they have achieved so far (accumilating) and show their name and score on a layout along with how many points are needed for the next promotion.

It should also load their options, such as, right hand controls > compact and ship 2 > shield 3, along with any of the sound options they have chosen.

I know this will take a lot of local storage and variables, just trying to find out how to add this logic and loading it is a huge task. Its hard for me to try and take bits and pieces of several examples and tutorials and combine them into one.

Its the whole ocd - adhd thats kicking my butt.

Again, thank you for the reply, plinkie.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107


Return to How do I....?

Who is online

Users browsing this forum: Rudi55 and 5 guests