Mask troubles.

0 favourites
  • 11 posts
  • Im trying to mask a sprite I have, I tried making a animation in flash then using destination out to mask the mask created in flash(You'll understand when you see the capx) But that didn't work.

    I also tried to do it a way I have seen it done on the forums but I cannot get this working <img src="smileys/smiley6.gif" border="0" align="middle"> Can someone help me out please.


    Capx -

  • Why not just export it with a transparent background?

    Haven't really mucked around with masking yet, sorry.

  • I don't really understand what it's all about in your capx. But in short you want to make a kind of healthbar on a weird shape withough having to draw all the animation frame.

    I did something similair a while ago. I think if you understand this capx you might be able to adapt it to what you want to do:


    I just made this version to show how to use a texture as hp "blood"


  • Yann, Thanks for the help. I am trying to do the same thing as the heart example but I want it to use width instead of height. I tried to change all the Y's to X's and all the Height's to widths but it didn't work. Maybe you can help? Thanks.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I added a trick, To know what is the height of a full heart, I place 2 images points on the heart outline. One for the empty position, one for the full position. I then calculated the height between them and use it as a min/max for the height of the blood mask.

    You just have to replace theses image points and calculate the difference between imagepointX instead of imagepointY... Well send the capx if you don't succeed

  • Yann, If you look at the capx I provided I tried that, I could not get it working, Can you please help me Yann.

    I just want to have a timer, then have a max time, then the blue line will display the percentage of the time. I can do the timer maths. Just need help with the mask <img src="smileys/smiley6.gif" border="0" align="middle" />

  • You also need to make sure the image points at the bottom of objects are replaced to the sides.

  • Yann, Thanks. I actually learned something from that.

    But I wanted the the blue color to come over the wooden shape, being masked like this: but blue -

  • Oh also, I could open the capx, but there was a error. Looks like you modified the facebook plugin?

  • I updated the capx with coloring. You just need to put a source in instead of a destination out

    Anyway there's no facebook object in my capx

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)