So, I'm trying to make a flappy bird -like game and I'm using the "character physics" to make the bird fly/jump but the limit is 225 jumps...

Any solution to exceed this limit?

I'm relatively new to bge

  • $\begingroup$ Can you provide a screenshot of your character logic? $\endgroup$ Jul 20 '18 at 22:34

There is no easy way to do this. Even though there is a jumpCount property you can not edit it via script as it's readable only. However, after some tests I found a hacky workaround that might do it for you, because resetting the gravity seems to reset the jumpCounter. It can by achieved by this procedure:

Paste this script into the text editor.

import bge

def main():
    cont = bge.logic.getCurrentController()
    own = cont.owner
    hero = bge.constraints.getCharacter(own)

    # Reset the gravity:
    hero.gravity = 0
    hero.gravity = 30 #default value. You might change this :)

Then use the following setup on your player to trigger the script. Notice that the jumping is also done via the script. logic setup


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.