Make player with platform behavior bounce on solid

Get help using Construct 2

Post » Tue Nov 08, 2011 4:50 pm

Hello everyone!
This is my very first post here, I tried to find something on the forums about this but I couldn't so I hope you can help me out :)


So what I want is to have a platform player that can bounce on a ground just like a trampoline. So everytime the player jumps on the trampoline he will be pushed a little bit higher than his original maximum height before touching on the trampoline.


This is what I managed to do:
http://dl.dropbox.com/u/23138239/Trampoline.capx

It bounces perfectly when it doesn't have a solid behavior, but I want it to behave as a solid so the player can't walk through it.

As you can see in the example, I tried to hide a normal solid ground behind it to fake a solid behavior but it doesn't work very well.


Suggestions?
Thanks!Tuiii2011-11-08 16:52:00
B
19
S
3
G
3
Posts: 56
Reputation: 2,496

Post » Wed Nov 09, 2011 9:21 am

The problem with the solid one is the fact that objects directly adjacent do not count as overlapping.

A good way to do it is to have an invisible detector object,non-solid, extending below the player, always set to the position of the player.

When this overlaps, put in your bounce code.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Wed Nov 09, 2011 6:30 pm

I meant to make the event for the solid tramp (trampoline2) be a colision event. Anyway, that doesn't work properly too and I wonder why...

But what you told me to do seems to be working fine, thanks :)
B
19
S
3
G
3
Posts: 56
Reputation: 2,496


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Rezzon71, shinkan and 20 guests