How do I create a bar that increases when I grab an item?

Get help using Construct 2

Post » Sat Oct 15, 2016 6:58 pm

What I want to do is create a progress bar, but instead of setting the bar to a certain value when I grab the item, it increases the bar's value by five, which you will be able to see.
B
10
S
1
Posts: 12
Reputation: 474

Post » Sat Oct 15, 2016 8:45 pm

Do you know how to do it for setting a value? Instead of 'Set value' for variable you can use 'Add to' and just add 5.
B
47
S
18
G
84
Posts: 2,266
Reputation: 49,786

Post » Sun Oct 16, 2016 2:41 am

plinkie wrote:Do you know how to do it for setting a value? Instead of 'Set value' for variable you can use 'Add to' and just add 5.


The problem is that that's for instance variables, I want to do it with a progress bar. I can't seem to find an 'Add To' option on the progress bar.
B
10
S
1
Posts: 12
Reputation: 474

Post » Sun Oct 16, 2016 3:12 am

You can set the progress to progress+1 every X seconds, should show it increasing.
B
47
S
18
G
84
Posts: 2,266
Reputation: 49,786

Post » Mon Oct 17, 2016 11:57 am

What @plinkie means is that your variable will be the bar's width.
See? You wont be "adding to" directly to the progress bar. The bar is just a sprite/image; instead, it'll have a width which you'll be increasing its value by "5" whenever its needed.
English is not my native language. Sorry for any mistakes and feel free to correct me if needed.
B
14
S
5
G
3
Posts: 113
Reputation: 3,231

Post » Mon Oct 17, 2016 12:26 pm

OP says they can't find an add to option on the progress bar so I'm assuming they mean the progress bar built into C2 where 'progress' is the amount that the bar is filled. That's the object I was referring to although you can make one with a sprite.
B
47
S
18
G
84
Posts: 2,266
Reputation: 49,786

Post » Mon Oct 17, 2016 5:33 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests