How do I delay platform destuction after jumping

Get help using Construct 2

Post » Tue Apr 22, 2014 10:24 pm

Hey guys im trying to figure out how to jump on a platform and then have it destroy but stay a solid long enough for me to jump away and destroy it. Like a one time use platform. Right now It destroys but my character falls through cause the destruction of the platform happens too fast.

So think of mario when he jumps of goomba it destroys but he jumps off of it not falls right through it.

Also my game has one touch controls and my player jumps on his own. When ever he is on the ground he jumps. Its like doodle jump

I thought it would be straight forward but I cant seem to figure it out.

Thanks a lot for any input
B
8
S
2
G
1
Posts: 64
Reputation: 1,340

Post » Tue Apr 22, 2014 10:28 pm

You could do either
1. have multiple frames in an animation (all the same frame if you like). Normally animation speed is set to zero. Start animation when you step on platform and destroy at the end of the animation.
2. have an instance variable that counts down and destroys sprite when <= zero reached

Personally I would probably use option 1
B
37
S
9
G
5
Posts: 437
Reputation: 6,094

Post » Wed Apr 23, 2014 5:13 pm

Nice I would not have thought of the 1st one. Thanks a lot I will try the 1st one out then. Appreciate the help
B
8
S
2
G
1
Posts: 64
Reputation: 1,340

Post » Wed Apr 23, 2014 8:56 pm

You may want to also disable collision in the later frames of the animation if you go that route, so you're not still able to continue hopping on something that's clearly in the process of no longer existing.
B
31
S
6
G
3
Posts: 22
Reputation: 4,764


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948, plinkie, sublimate and 9 guests