Applying an effect to only a specific area

For questions about using Classic.

Post » Tue Oct 30, 2012 12:18 am

Hi

I'm working on a game on Construct Classic and I had a question about effects, specifically the wave effect to create a water effect. I don't want to apply it to the entire screen/layer, just an area. For example, there are platforms and there is water only on the lower third of the screen. The platforms are inside the water so the water and everything behind it (and the player if they are inside the water) should get the wave effect, but not the region on the upper two thirds of the screen outside of the water.

Any ideas?

Thanks
B
4
Posts: 20
Reputation: 340

Post » Tue Oct 30, 2012 2:13 am

Use the canvas object, it has a property "grab layout" that if set to "before drawing" takes whatever was drawn under it. You can then apply effects to that area.
B
79
S
24
G
54
Posts: 4,754
Reputation: 40,771

Post » Tue Oct 30, 2012 6:04 pm

Thanks R0J0hound, that worked like a charm!
B
4
Posts: 20
Reputation: 340

Post » Thu Nov 01, 2012 11:24 am

Not entirely sure if you would save VRAM (depends on the area size), but you can also stack your desired effect after the "Apply Below" shaderhttp://www.scirra.com/forum/effect-apply-below_topic43352.html on a dummy tiled background. It doesnt work with all shaders, though.
Image
B
13
S
4
G
1
Posts: 113
Reputation: 1,712


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests