Pasting image into sprite then masking it

Get help using Construct 2

Post » Mon Mar 18, 2013 10:55 pm

Hi!

I want to load a portion of an image into a sprite, then masking it with another sprite.

I used Pode's ImageTextonSprite to do the first, but I can't do the masking part.

I tried scirra "destination atop" blending but, since back image is always bigger than the masking sprite, undesired effects appear when two sprites are next.

(I want to make a jigsaw puzzle, and I have a set of "jigsaw cuts" for the mask, this is why putting a mask near the other one matters).

B
42
S
13
G
5
Posts: 132
Reputation: 8,503

Post » Mon Mar 18, 2013 11:14 pm

I'd say preparing your sprites ahead of time with proper image editing software would be your best bet... but I guess it seems like you're trying to do it dynamically within your app. What kind of undesirable effects are you experiencing? Try make your masking sprite oversized?
Mistakes were made.
B
45
S
22
G
77
Posts: 1,191
Reputation: 44,247

Post » Mon Mar 18, 2013 11:17 pm

You can do it with the canvas plugin. Here's an example:
http://dl.dropbox.com/u/5426011/examples17/puzzle_piece.capx
B
85
S
27
G
77
Posts: 5,000
Reputation: 53,734

Post » Tue Mar 19, 2013 5:35 pm

@R0j0h0und: I thinked about using canvas (indeed I installed canvas and ImageTextOnSprite at the same time), but, as that lacked some "sprite" conditions, I gave up from using it.
I passed over the possibility of using a drag and drop behaviour.
B
42
S
13
G
5
Posts: 132
Reputation: 8,503


Return to How do I....?

Who is online

Users browsing this forum: Trimeister and 8 guests