Accessing character physics attributes in python

Hey fellow bge users, I made a player movement script using the character wrapper in python, and there are some attributes that I want to be able to change in-game with properties. I already know how to access properties in python, and I’ve read the api for the character wrapper, but I can’t find any documentation on the attributes for jump force and the step height (and what type of property they are).

Just to give you an idea:

import bge

cont = bge.logic.getCurrentController()
own = cont.owner

#get character
char = bge.constraints.getCharacter(own)

#use properties as attributes
char.stepheightattribute = own['stepheightattribute']
#typed in "stepheightattribute because I don't know what it is

char.jumpforceattribute = own['jumpforceattribute']
#typed in "jumpforceattribute because I don't know what it is

Any information would be appreciated.

No simple answer here… But do you know the “dir” command? In such cases, I add a statement:
print (dir(char))
which will print all properties of the object. Usually, the (enormous) list ends with the interesting stuff.

Well, that’s good to know. Using that command and digging through python, I discovered that the “jump” function is read-only (hard-coded). The only way to change them is in the collisions tab. :frowning:

I hope this gets changed, it’s just a small part of the api that needs to be rewritten.

The character type is made for easy use/showcase models controlled by logic bricks.

If you need a fast setup to move around you use character type, if you want to be able to program anything you want then you should use dynamic type.