Make Player drawn to the platform


#1

hi guys I would like to make my character drawn to the platform when is jumping. so when the player heats the button the character jumps and immediately grub the platform edge without the need to maneuver it to the platform.

thanks.


#2

Makes sure your platform has the “platform” behavior and “is grabable” is true.
Make sure your player has the “platformer” behavior and “Can grab platforms” is true.
Come up with some condition like “Player is jumping” and “Pick nearest platform to player” and then the action you will use is “Move player object towards object” and select that platform as the target, and pick a speed that feels good. Start at like 1000.


#3

Thanks allot it is actually help.


#4

How can I make the player when he jumps again to drawn to another platform and detached from the platform he is currently on?


#5

You need to come up with a design strategy of how you want this to work, the implementation will likely be to just add a few more variables and conditions.

For instance let’s say you can only grab a ledge once, then you could add an instance variable to the platform when you grab it like “HasBeenGrabbed” and set it to “1” when you grab it. Then change your currently pull towards ledge condition to exclude any platforms where “HasBeenGrabbed” is “1”.

That’s just an example… you need to think about how exactly you want your systems to work before digging into the implementation… or you can just experiment with implementations until you find something you like… but it’s going to be hard for someone else to tell you how your game should work.