Opacity Mask

Get help using Construct 2

Post » Mon Jan 27, 2014 3:29 am

Hello folks,

run into a bit of a wall that I can't seem to find an answer for elsewhere.

Opacity Masks!

Bog standard "This is a health bar, extend this image over it to mask it based on current hp".

Bit of a pain working with non-rectangular/detailed health bars since you can just set the origin to the end and the adjust the width based on health, sadly this one needs a specific masked shape.

Image from the usual flash method of what i'm talking about if I wasn't clear:




So yeah, how do I Opacity Mask?

Cheers, MattMattTonkinson2014-01-27 03:31:02
B
9
S
2
Posts: 69
Reputation: 833

Post » Mon Jan 27, 2014 3:34 am

Use a tiled background and set the width. Instead of scaling it, it will just cut off the parts that dont fit.EncryptedCow2014-01-27 03:35:01
B
47
S
14
G
7
Posts: 603
Reputation: 8,141

Post » Mon Jan 27, 2014 3:37 am

That's... genius! Will more than do for this project if there's no actual opacity mask functions.

Thanks @EncryptedCow
B
9
S
2
Posts: 69
Reputation: 833

Post » Mon Jan 27, 2014 6:51 am

Opacity masks do exist.

Open up the blendmode example shipped with Construct2 to see all possibilities.
For this I would recommend tiledbackground though.
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: Blendi1223, kellehk, Yahoo [Bot] and 27 guests