Page 1 of 1

Disappearing lava behind platform?

PostPosted: Wed Aug 28, 2013 9:41 pm
by Codeman320
I'm gonna make a lava level. And I want one part of it to have a lavafall appear for a few seconds, then disappear. But I'm not sure how to make it disappear behind a wall or platform without it having to go through the entire level, just to disappear when it's out of the layout.

Re: Disappearing lava behind platform?

PostPosted: Wed Aug 28, 2013 10:10 pm
by cvp
I am not totally sure i understand what it is you are trying to do here. So this might be way off

But if you want to destroy the lava(if it is a sprite or something) you can make an invisible bar where you want it destroyed, and then destroy the lava when a collision with your invisible bar is detected.

or you can use the fade behavior to fade it out.

Or use a timer and destroy it after a given time period.

Re: Disappearing lava behind platform?

PostPosted: Wed Aug 28, 2013 10:13 pm
by Codeman320
This is what I'm talking about:

http://www.youtube.com/watch?v=J2H5MfyAvWk

Skip to 1:57 to see what I mean. When the lava falls behind a wall, it disappears.

Re: Disappearing lava behind platform?

PostPosted: Wed Aug 28, 2013 10:17 pm
by ArcadEd
Just make that one piece of lava have the bullet behavior, but not active on start. Put it on the layer below the lava it's going behind. Then when you are ready, activate the bullet and watch it go down and away. Then just have it destroy outside of layout so it's not lingering.

Re: Disappearing lava behind platform?

PostPosted: Wed Aug 28, 2013 10:38 pm
by Codeman320
Could I destroy it If it leaves the screen?

Re: Disappearing lava behind platform?

PostPosted: Thu Aug 29, 2013 12:13 am
by ArcadEd
Sure, or just create an invisible sprite that it collides with to destroy it.