Good way to constrain many drop shadows at once?
K1dTrunks
PRO Posts: 55
What I'm trying to do is create and constrain multiple (no more than 10) drop shadows at the same time. I have actors that are spawned and fly around the screen, and I want them all to have their own shadow that follows their x position (and ideally would also track the y position so the shadows could change shape as the flying actors rise/fall.) Basically imagine Fruit Ninja where all the fruits have a shadow that moves along the ground. (my game isn't fruit ninja, just using an example!)
Is there a good way to accomplish this, perhaps using tables? I haven't really used tables at all, so I'm not familiar with the capabilities. Of course I know how to do the constrains, I'm just trying to figure out a good way to track all those positions at once, then once a fruit is destroyed how to let another fruit use that table cell/attribute to store its position. I'm sure this is possible, so please don't just say it isn't. I realize it may be complicated but I'm willing to try anything. Any help is appreciated!
Is there a good way to accomplish this, perhaps using tables? I haven't really used tables at all, so I'm not familiar with the capabilities. Of course I know how to do the constrains, I'm just trying to figure out a good way to track all those positions at once, then once a fruit is destroyed how to let another fruit use that table cell/attribute to store its position. I'm sure this is possible, so please don't just say it isn't. I realize it may be complicated but I'm willing to try anything. Any help is appreciated!
Comments
http://forums.gamesalad.com/discussion/comment/384027/#Comment_384027
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Also, any ideas on how I could have the shadows shrink/grow as the tossed actors move up and and down? I'm having trouble figuring out how to do it based on the inverse relationship between the shadow's size and the height of the actor.
Check out my 'card toss' demo (might be some use?):
(attached file in following post)
So, you want your shadow to enlarge (and grow fainter) as your object goes up - and become smaller (and darker) as it approaches the ground.
To achieve this simply link the shadow's size and opacity to the Y co-ordinate of the actor casting the shadow (with a little suitable maths).
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx