Here is an effect that puts a colored outline around a sprite. I does it by offsetting silhouettes of the sprite in eight directions so it can look a bit weird with large line widths.
https://www.dropbox.com/s/dkg43r4xwzkvr ... e.zip?dl=0
Feel free to modify.
mm Thanks R0j0hound ..it all helps...will have a look later
sounds good though...
Develop games in your browser. Powerful, performant & highly capable.
Man... You are a champ!
Since it works as you said (offset silhouettes), will it work with transparent objects?
Hmm, this seems broken to me. I can't get it to work at all...
Could you tell me how to use this effect...How do I import in CC2..
So sorry but I am new in Construct
Excellent in principle but I can't seem to get it to work either
It's working for me on two different computers, Firefox and Chrome.
What is it that isn't working? Does the sprite draw with no outline or does the game not load?
Does the sprite you apply it to have any transparency? The outline is applied between transparent and opaque pixels, but it doesn't draw beyond the sprites quad so a solid color sprite will have no visible outline.
Oh, it doesn't apply beyond the object's quad. I think that's why it didn't work for me.
Is there any chance that this could work applied to a layer (i.e. all objects in the layer get the outline)? When I try it, it just outlines the whole layer.
It won't work on the base layer since it doesn't have any transparency, but if you add another layer it should work.
Ah, OK. It seems jolly good then!
Is there any way to fix it so the outline doesn't scale with the layer scale?
Another thing: If the outline is applied to a layer, changing the outline color will change the color of everything else in the layout.
Take a look at the example, the background is actually blue.
Ok, I fixed that bug and tweaked it a bit. Re-download from first post.
Ok, that almost did the trick. I'm still getting some color changing effects on the same layer it's applied to, but I'm using masking and transparency and other shenanigans. I'll see if I can whip up an example tomorrow.
Hey that's a neat effect!
How about a new parameter where you can define the number of directions you need as offsets (to make it smoother with large widths)?
Also would it be possible to have an outline "glow" as well with the same technique(like the outer glow in photoshop)?
thanks! <img src="smileys/smiley2.gif" border="0" align="middle" />