how do I partially fill any sprite?

Get help using Construct 2

Post » Tue Jul 26, 2016 4:12 am

I am a newbie here. what i want is to fill any sprite partially.
I want to show timer strip [ suppose a loading bar ] which keeps reducing as time goes on and gets filled as a player gets a powerup.
I have used unity where i could have used fill property of an image but is there any way to do this same with sprite or tiled background???
If I am wrong and filling is not the proper way to do such thing, then kindly tell me any possible way in C2.
B
6
S
2
Posts: 8
Reputation: 468

Post » Tue Jul 26, 2016 5:12 am

There's a few ways to do this depending on how you want the effect to look.

Typically you can either use a tiled background object and just "stretch" it to the size you want... or you can use a sprite with animation frames showing the progress bar at various positions - then set the animation frame based on the progress percentage.

I have little interface "bars" for my current project to show player health and hunger levels, etc... I use a tiled background and set the width to; (bar.width/100)*player.hunger

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
81
S
34
G
40
Posts: 3,031
Reputation: 30,422

Post » Tue Jul 26, 2016 6:53 am

thanx buddy, tiled background saved me :-) !!!
B
6
S
2
Posts: 8
Reputation: 468

Post » Tue Jul 26, 2016 7:20 am

No problem!

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
81
S
34
G
40
Posts: 3,031
Reputation: 30,422


Return to How do I....?

Who is online

Users browsing this forum: jaytrott86 and 10 guests