Apply effect to group of sprites

Get help using Construct 2

Post » Wed Feb 26, 2014 6:16 am

Hey there,

I may be overlooking the simplicity of this, but I'm wondering if there is a way to group objects together (eg. Containers, families) that will allow me to apply an effect to the entire group.

For example, I'm trying to make the WebGL outline effect (plugin) outline the silhouette of a character composed to different sprites (hair, body, eyes, clothes). So far I've figured out I'm able to do this with layers, but if I do this, it would mean I need a different layer for each character I want to apply the effect.. At different timings.

Anyone have a better solution?
B
37
S
11
G
6
Posts: 962
Reputation: 11,254

Post » Wed Feb 26, 2014 9:39 am

@Rory

Yes, you can add effects to families, if you go into your "projects" tab and select the family (create one if need be), then with it selected in the projects tab you'll see options for the family in your properties window on the left.

add the effect to the family there and then use events to enable/disable it..

Hope that helps buddy
B
9
S
2
Posts: 26
Reputation: 586

Post » Wed Feb 26, 2014 3:12 pm

Unfortunately.. I tried it out but it doesn't work the way I want it to. I want the effect to be applied to the family as a collective sprite. This is how the method you suggested turns out.

Image

This is how i want it..

Image
B
37
S
11
G
6
Posts: 962
Reputation: 11,254

Post » Wed Feb 26, 2014 3:15 pm

In your case, you'd maybe want to apply the effect on a layer instead

EDIT: I missed a part of your first post, my bad, but I still think layer are the way to go, maybe there is a better solution.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Wed Feb 26, 2014 3:49 pm

Outline need opacity

sprite without transparent border
Image

Sprite with 1px transparent border
Image

So you could try drawing your sprite parts without transparency where they should connect
Image
B
157
S
66
G
41
Posts: 2,597
Reputation: 34,821

Post » Wed Feb 26, 2014 9:12 pm

Ahh, I see what you are after, I can't think of any perfect way to achieve this using effects, shinkans idea is great but I'm guessing it won't work with non-square images, like the hair you have, you want the fringe to not have a border, but the tips on each side increase the height of the sprite causing the fringe to have a larger space of transparency beneath.. so the bottom of the tips wouldn't have an outline, but the inside would..

Off the top of my head, You could try doing this with Animation Frames, it's the longer way around, when condition is true > goto frame 2 which you have drawn the border sections in manually..

....
B
9
S
2
Posts: 26
Reputation: 586


Return to How do I....?

Who is online

Users browsing this forum: eochranek, fearfulelephants and 18 guests