Solution tips on jumping

0 favourites
  • 3 posts
From the Asset Store
Jump on candies, collect candies and earn score!!!
  • I'm fiddling with allowing the player to jump in my gta clone. I know in theory how to achieve the results I want, I'm pondering the best solution for it.

    The situation is this: when the player presses the "j" key this piece of code runs:

    Now, as long as "jump" = 1 how would I go about handling the solid state of objects that are jumpable?

    My current idea would be something like this: If jump = 1 and player overlaps for example a car, that cars solid state is set to off, I forsee an issue that if an npc is on the screen at that moment, it would be able to go through the car too?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Is this is a top-down game? What behavior are you using for the character and NPC movement? With Bullet, you can use "Bounce off car" action instead of making the car solid. With other behaviors it may be trickier. One option is to temporary disable collisions for the character for the duration of the jump.

    Also, instead of that bunch of "Set scale" and "Wait" actions I recommend using Sine or LiteTween behavior. It will look much nicer and you can use LiteTween's events like "On tween end" to detect when the jump has ended.

  • Yep, it is topdown. I will look into and exeriment with sine behaviour, thank you for the tips =)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)