Image Masking

For questions about using Classic.

Post » Tue Dec 04, 2012 2:56 am

Is it possible to mask off part of an image, and at the same time change the collision mask so the part that is visible can still be collided with, while the part that is now invisible can not?

Or at the very least is there a way to create the same effect?

P.S. Trying to do this during run time.
B
3
Posts: 59
Reputation: 418

Post » Thu Dec 06, 2012 3:55 pm

That is pretty difficult unfortunately. Do you need the objects to collide like solids or just perform events when they touch?

If it's the latter, I'd say check for a collision with the masked object, and then check to make sure that it's not overlapping with the mask itself. That way you know you're touching the object where it's visible (might need some tweaks on overlapping at offset and etc to get it to work in every case though).
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Fri Dec 07, 2012 1:44 am

Ah, I understand. This should be a lot simpler now. Thanks.

Also this should have been my first question, but how exactly do I use the mask effect? When I apply the mask I have this giant black void around it and I get this permanent image echo effect for anything that moves around in the black.

And is there a way to invert the mask?

Edit: If I make the mask dynamic (having it move) it acts like a paint brush, undoing the rest of the mask. (that's not really my goal)RandomDood2012-12-07 02:05:55
B
3
Posts: 59
Reputation: 418

Post » Fri Dec 07, 2012 11:05 pm

Sounds like you want the erase effect instead. Erase reveals things on the layers underneath, not used the mask effect myself yet so I can't say how it works.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sat Dec 08, 2012 5:41 pm

Awesome. It works perfectly.
Thank you
B
3
Posts: 59
Reputation: 418


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest