Cut out a sprite instead of scaling it

Get help using Construct 2

Post » Mon Dec 02, 2013 10:36 am

Is there a way to cause a sprite to cut from the texture when I scale it, instead of scaling the texture?

An example would be a textured health bar. Rather than scaling the texture down, I want to only use 50% of the texture if I set the width of the object to 50%, and cut off the rest.

There's probably some way I could do this with Blending modes, but doing it for each UI object would be pretty complex. Is there a simple way?Squidget2013-12-02 10:38:59
B
7
S
1
Posts: 45
Reputation: 1,315

Post » Mon Dec 02, 2013 10:40 am

If your sprite doesn't have animations, the easiest way would be using the tiled background object.

If it does have animations using the blendmodes would be your best option.
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 » Mon Dec 02, 2013 3:36 pm

You might also be able to use the 9patch object
B
88
S
44
G
16
Posts: 1,009
Reputation: 17,971


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests