How do I a list of sprites to do a combination

Get help using Construct 2

Post » Thu Jan 15, 2015 11:50 pm

Hi everyone !

First, i'm not sure if my title subject is correct.
So i'll explain my vision of it, i am doing a kind of platform runner game, her goal is to pick up some coins/points... and each time she get a "coin" it will appear in a bar. They will be different coins but it doesn't matter.

I've attach some pictures i made on paint ^^ !

But you should probably understand what i mean after.

A the end of maximum 10 coins picked you get a bonus "x2" Then the list of coins goes back to zero until she pick other coins. That should be easy by then, so i would like so some help to hint on something. Arrays, variables, create objects...:/ couldn't find more.

Voila!
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 4
Reputation: 183

Post » Thu Jan 15, 2015 11:58 pm

So your problem is exactly?
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Fri Jan 16, 2015 7:39 am

The way I would do it - make your pickup display thing a single sprite with animation frames for each pickup display (let's say black dot for frame 0 and different notes for all the rest).

Then make an array, size 10, a variable - index, and a variable - bonus. Every time a user picks up the goody do something like: Set array at (index) to pickup number (frame). If Index = 10 bonus = bonus +1, index = 0

To display this you could make a little function that redraws your note list by reading the array - look at arrays in the manual to see how.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 9 guests