How can I alter alpha channel of a sprite ?

  • Hi there,

    Im wondering, if you can make holes in sprites during gameplay. I would like to Have one big sprite than make small holes into it during gameplay. So I thought using alpha of a sprite will do what I want, but I didnt find much. Is that possible? Or is there other way to do it ?

    It is for mobile device project so I need to have small amount of sprites. That means using blending effects is not the best idea I guess.

    Thanks in advance for responses!

  • ......

  • Hi,

    thank you for the reply, but since I earlier said, I would like to avoid blending, since I will make a lot of holes in one sprite. If I use blending effects I would have to use for each hole new sprite. I would like to avoid that. I tried Canvas plug-in to draw "holes" on canvas, with blending effect to make the holes in the sprite under it. but the catch is, that canvas doesnt have abillity to use blending effects :/ I tried to apply blend effect on whole layer where canvas are, but no luck.

    So question remains the same, is there a way to alter alpha of a sprite in-game?

  • So there is no other way, than using blending effects? Cmon, there has to be. I know it is a lot different, but in Unity and Unreal dvelopment kit, I was able to alter alpha channel realtime in game. What am I missing ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:tdau5iyz]canvas doesnt have abillity to use blending effects

    Not true.

    You can use the canvas or paster plugins to do the effect you want. The way you erase is by using the "paste object" action with another sprite that has the "destination-out" blend.

  • Im sorry, my mistake,

    but I cant figure out how to use it the way I want anyway :/ I would like to Have one big sprite than make small holes into it during gameplay. And some way to make holes into it, using as little sprites as possible. With canvas I think it is possible to do it, but Im not quite there

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