How can we get stars when you win?

Just started using Construct 2? Post your questions here

Post » Fri Jun 23, 2017 7:41 am

Hi
How can we get stars(1 or 2 or 3) when you win certain level in a game and this stars should be stored in local storage.
Can we get this if we are using one event sheet for all levels.
Please help me.
Thanks in advance.
B
22
S
8
G
1
Posts: 32
Reputation: 2,064

Post » Fri Jun 23, 2017 4:00 pm

Hi,

Anything you see must be created.

You would need to create a victory layout where you give stars depending on the performance, which could be a simple comparison of a GLOBAL variable such as if SCORE is X then give 1 star, etc.

Regarding storage, you only need this if you want the game to remember the user information next time the user opens the game. The easiest would be to use Local Storage. But again you can easily have your victory / stars system without storage.

If you want the session to remember the performance of each level you can simply to do with GLOBAL variables such as
LEVEL_1_COMPLETED = 0
LEVEL_2_COMPLETED = 0
LEVEL_3_COMPLETED = 0
ETC

Good luck!
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.

My games & gaming portal = DolyGames

If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.

Cheers,

COSMOS
B
20
S
9
G
1
Posts: 75
Reputation: 2,152

Post » Sat Jun 24, 2017 4:47 am

Thanks.But could you please make a sample capx for me
B
22
S
8
G
1
Posts: 32
Reputation: 2,064

Post » Sat Jun 24, 2017 10:00 am

B
22
S
12
G
1
Posts: 108
Reputation: 2,774

Post » Sat Jun 24, 2017 10:03 am

that oughtta do it
B
22
S
12
G
1
Posts: 108
Reputation: 2,774

Post » Sat Jun 24, 2017 10:58 am

Thanks but i cant open this file as a using construct 2 i thik .can you please please send capx file
B
22
S
8
G
1
Posts: 32
Reputation: 2,064


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 5 guests