Shadows

For questions about using Classic.

Post » Thu Jul 19, 2012 9:11 pm

Hi i neeed this in my space shooter: I have lot of object1 and i need to create object shadow at object1.X and object1.Y + 100 for each one and shadow has to always follow object1 again for each one, and when object1 destroys then i need to destrys shadow but only one. Is this possible? I tried it but there is lot of bugs :/ it does not work corectly. PS:(i used for each one ;)) Pls tell me how to and pls .cap too.

ty for help
B
24
S
4
G
2
Posts: 318
Reputation: 2,446

Post » Fri Jul 20, 2012 12:00 am

Easiest way is to import the same sprite numerous times and to create a shadow object for each sprite.

Here's an example cap file.The cap was created with classic construct R2.

Shadow example capDravenX2012-07-20 00:15:46
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Fri Jul 20, 2012 10:22 am

No this is nnot easiest :/ When i have in room 200 same object i have to copy 200x with shadow and 200x events and actions for each object... I need another :/ because i have 98% in event sheet made i need to complete only shadows :(
B
24
S
4
G
2
Posts: 318
Reputation: 2,446

Post » Fri Jul 20, 2012 11:41 am

You can do this very easily by making use of the Dropshadow object. Also there's a dropshadow shader that can do this in a similar, albeit not as flexible, way. Being a shader effect it'll also take far more GPU cycles in some situations especially if you have hundreds of objects. Although you could apply dropshadow shader to an entire layer thus reducing the required shader passes to only one that spans the entire screenspace.

This one uses the Dropshadow object; I found it far more intuitive for this:
https://dl.dropbox.com/u/326175/dropshadow1.cap
B
11
S
2
G
3
Posts: 100
Reputation: 2,150

Post » Sat Jul 21, 2012 11:50 am

Thx this is it :)
B
24
S
4
G
2
Posts: 318
Reputation: 2,446


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests