Actor in front and behind another actor
mrchris317
Member Posts: 78
Hey all, lets say I have a tree. I want it so that when my hero/actor goes behind the tree you cant see him anymore (like a 3d effect). However, when hes in front of the tree its like the tree is behind him and it looks 3d. The reason for this is because Im doing an overhead game but the art is 2d. Thanks so much. Appreciate the help.
Chris
Chris
Answers
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
One actor has its alpha channel turned off (0) and is on a background layer.
The other has its alpha channel turned on (1) and is on a foreground layer.
The object you want the actor to go around is on a layer in between these two actors.
When you want your actor to be behind the object turn the background actor's alpha channel on (1) and the foreground's alpha channel off (0).
You can place triggers around your object to do this automatically for you.
I am doing this in a game I am working on, it works really well.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User