How do I make Progress bar

Get help using Construct 2

Post » Thu Sep 24, 2015 7:40 pm

There are multiple gems in my layout i would like the progress bar to fill when player picks up a gem can you help me out with this one?
B
10
S
1
Posts: 93
Reputation: 722

Post » Thu Sep 24, 2015 10:53 pm

Create a global variable for 'Gems' if you havent already.

When your player sprite is overlapping gem sprite, add 1 to 'Gems'.

Every tick, set width of 'progress bar' Sprite to 'Gems' Value.

GL!
B
9
S
3
Posts: 104
Reputation: 1,033

Post » Fri Sep 25, 2015 6:16 am

Here's an example:

Live example in browser

Here's the associated capx:

capx
B
103
S
38
G
19
Posts: 962
Reputation: 17,996


Post » Fri Sep 25, 2015 8:58 pm

@Frostein the amount of gems are different in each level, i want the par to fill up 100% when all of the gems in the layout have been picked by the player.
B
10
S
1
Posts: 93
Reputation: 722

Post » Sat Sep 26, 2015 12:12 am

set the width as a percentage. There are a few health bar tutorials knocking around, they work the same except subtracting from the bar.
B
9
S
3
Posts: 104
Reputation: 1,033

Post » Sat Sep 26, 2015 1:25 pm

Somebody help me out
B
10
S
1
Posts: 93
Reputation: 722



Return to How do I....?

Who is online

Users browsing this forum: max2612 and 5 guests