help

Get help using Construct 2

Post » Sat Mar 22, 2014 11:45 am

Hi I have a game where each level can be obtained maximum 3 stars, I have a select level 15 missions.

I have a meter to tell how many stars have earned at all levels. For example 5/45 stars.
I have a global variable: stars
As I can do this?

Example:

http://www.androidtapp.com/wp-content/u ... select.png
bottom left 7/90

http://www.androidtapp.com/wp-content/u ... select.png
top right - 26
B
13
S
2
Posts: 297
Reputation: 1,717

Post » Sat Mar 22, 2014 1:20 pm

use a 2d array

position 0,1 = level 1
position 0,2 = level 2
etc..

When you collect a star on a level add a value of 1 to the corrisponding array position and to get the total amount throughout all levels just add up all the array values and set your global variable to it.
B
14
S
6
G
3
Posts: 83
Reputation: 4,238


Return to How do I....?

Who is online

Users browsing this forum: BiffanyPFH, dop2000, Klarner and 27 guests