I need platforms destroyed once leaving bottom of scene on a scrolling layer?
So I have a game where the main actor moves up, jumping on platforms to keep from falling. I have a control camera on the main actor. The platforms and main actor are on a scrolling layer. I need the platforms to be destroyed when they reach the bottom part of the scene, so that if the main actor misses a platform it will fall and be destroyed.
The problem is that I can't put an actor at the bottom of the screen that destroys the platforms when they collide with it because I would have to have that actor on a non scrolling layer, and different layers won't collide with each other.
Does anyone have any ideas of what I could do to destroy the platforms once they leave the bottom of the scene?
Thanks for any help!!
The problem is that I can't put an actor at the bottom of the screen that destroys the platforms when they collide with it because I would have to have that actor on a non scrolling layer, and different layers won't collide with each other.
Does anyone have any ideas of what I could do to destroy the platforms once they leave the bottom of the scene?
Thanks for any help!!
Comments
Create a real attribute stating the Y position of the Main actor. Eg. Main.Actor.Y. Which assume its always moving up?
Then constrain Main.Actor.Y position to the Main Actors Y potion.
Then, in the platform actor, create an if statement stating the following.
If self.Actor is equal to or less than (Main.Actor.Y-(eg)50)
{destroy Self}
That should work, if I understand it correctly.
-Hope this helps!