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
52
S
21
G
93
Posts: 2,410
Reputation: 55,008

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
52
S
21
G
93
Posts: 2,410
Reputation: 55,008

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.
B
18
S
7
G
4
Posts: 154
Reputation: 4,113

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
52
S
21
G
93
Posts: 2,410
Reputation: 55,008

Post » Mon Oct 17, 2016 5:33 pm

B
33
S
18
G
29
Posts: 2,493
Reputation: 21,450


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, socialpilgrim and 5 guests