How do I make a progress tracker

Get help using Construct 2

Post » Fri Nov 18, 2016 2:21 am

any idea how to make a vertical progress tracker guys?? i'm having a hard time thinking about this one. thanks for the advance help guys. more power!
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Fri Nov 18, 2016 10:04 am

Do you have any examples of what you mean?
B
46
S
16
G
74
Posts: 2,088
Reputation: 44,185

Post » Fri Nov 18, 2016 11:25 am

Here's my take on this :

1) Create a sprite
2) set a global variable named "ProgressValue" or anything you want
3) every tick => set height of "sprite" to "ProgressValue" (you can make something like *2, *5 or whatever to make the bar bigger than 100pixels.
4) if you want some color, just edit frames of your sprite to the colors you want, lets say green and red, and then :
5) Event : If "ProgressValue" < or = 25 => set Sprite animation to frame "1", where frame 1 corresponds to the color you want, in this case I would guess red.
6) Event : If "ProgressValue" > 25 => set Sprite animation to frame "0", where frame 0 corresponds to the color you want, in this case I would guess green.
B
9
S
3
G
1
Posts: 21
Reputation: 1,167

Post » Sat Nov 19, 2016 3:07 am

plinkie wrote:Do you have any examples of what you mean?



i dont know how to put pictures here but i will try to illustrate here

DMG [====THIS IS A BAR=========]
LCK [====THIS IS A BAR===]

like that
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Sat Nov 19, 2016 3:08 am

DiabloOvermind wrote:Here's my take on this :

1) Create a sprite
2) set a global variable named "ProgressValue" or anything you want
3) every tick => set height of "sprite" to "ProgressValue" (you can make something like *2, *5 or whatever to make the bar bigger than 100pixels.
4) if you want some color, just edit frames of your sprite to the colors you want, lets say green and red, and then :
5) Event : If "ProgressValue" < or = 25 => set Sprite animation to frame "1", where frame 1 corresponds to the color you want, in this case I would guess red.
6) Event : If "ProgressValue" > 25 => set Sprite animation to frame "0", where frame 0 corresponds to the color you want, in this case I would guess green.



hmmmm will try this one
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Sat Nov 19, 2016 11:38 am

Yeah that post is good if you want to make your own from a sprite. There is also a built-in progress bar in C2 which you can try.
B
46
S
16
G
74
Posts: 2,088
Reputation: 44,185

Post » Sat Nov 19, 2016 8:29 pm

I'm new to construct 2 so it may not be great but here goes, hope it helps, click the download arrow at the top of the page.

Code: Select all
https://drive.google.com/file/d/0B2ztlkoVxR-FekFiUkxHTU9qWDA/view
B
12
S
3
G
2
Posts: 38
Reputation: 1,394

Post » Sat Nov 19, 2016 10:18 pm

Maybe something like this will help
https://www.youtube.com/watch?v=kCFOp5ymqBU
B
36
S
10
G
9
Posts: 212
Reputation: 6,945

Post » Mon Nov 21, 2016 2:07 am

thanks guys.. will try all your suggestions :D
B
79
S
31
G
7
Posts: 148
Reputation: 9,179


Return to How do I....?

Who is online

Users browsing this forum: nahima and 9 guests