How Do I Combine A Progress Bar With A Timer?

Get help using Construct 2

Post » Wed Jan 22, 2014 8:42 pm

Hi everyone,Im trying to figure out how to combine a simple loading bar to a timer.I ask this because i want the player to wait a specific time before he or she can farm food.I understand how to create the actual timer and combine that alone to the action i need,but i want to be alot more visual.
I want to have some sort of bar that fills up simultaneously with my timer.
Could someone show me how this is done?
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Wed Jan 22, 2014 8:59 pm

All you'd have to do is transfer the time to the width of the bar.

If your timer is 5 seconds and a full bar is 100 width
every 0.1 seconds set bar.width to bar.width+2
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Jan 22, 2014 9:05 pm

@LittleStain Awesome! i didnt think it was that easy,I swear Scirra always amazes me! thank you littlestain
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Wed Jan 22, 2014 9:10 pm

You'll probably have to tweak it a bit to get the exact effect you want, but basically that's about it.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: dand, mickclarke and 27 guests