How do I Make Platforms Vanish After Walking on Them

Get help using Construct 2

Post » Thu Sep 08, 2016 6:23 pm

So I have been struggling with this for a while now. I want to make it so that my player Sprite can move across a solid Sprite using the platformer movement and after the player is no longer touching the platform, the platform should disappear - I can't seem to find the right event to make this happen.
Posts: 5
Reputation: 185

Post » Thu Sep 08, 2016 6:46 pm

Give it a variable. It's 0, in collition with player, set it to 1, you could start a timer to get rid of it.. or, when player distance is further than 30 (eg) and the variable is 1, destroy the platform.

A Boolean would also work
Posts: 113
Reputation: 1,009

Post » Thu Sep 08, 2016 6:56 pm

Add the an instance variable (boolean) to the platform named "trigger"
Add the Fade behavior on your platform and name it FadeOut.

--With these properties:
---Active on start: Yes
---Fade in Time : 0
---Wait Time: 0
---Fade out Time : 1
---Destroy after Fade out : Yes

Add these events:

Comment: For the trigger

+Player - On collision with Platform:
->Platform - set boolean (trigger) to true.

Comment: Fade Out (Destroy Fade Effect)

+Platform is boolean (trigger)
++Player is not overlapping Platform
-->Platform - FadeOut : Fade Out start

Comment: Anti-Solid Bug

+Platform on destroyed
++Player is overlapping Platform
-->Player - Set Y to (Self.Y + 1)

I hope that works out for your game. :)
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
Posts: 1,152
Reputation: 62,415

Post » Thu Sep 08, 2016 7:22 pm

This code works great thanks. One more thing, I have several platforms in my game, will I need to do this for every single one of them?
Posts: 5
Reputation: 185

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 3 guests