UPBGE / UPBGE-Docs

UPBGE Manual
https://upbge.org/docs/latest/manual/index.html
19 stars 16 forks source link

UPBGE Manual » Python Scripting » Python and the Game Engine: corrections #29

Closed denicolas closed 3 years ago

denicolas commented 3 years ago

UPBGE Manual » Python Scripting » Python and the Game Engine https://upbge.org/manual/manual/python/python_game_engine.html

In section "Integrating Python in the Game Engine", script "abracadabra.py":

    sens = cont.sensors['my\_sensor']
    act = cont.actuators['my\_actuator']

should be:

    sens = cont.sensors['my_sensor']
    act = cont.actuators['my_actuator']

"AttributeError: 'KX_FontObject' object has no attribute 'text'" This line:

    text_obj.text = "CADABRA"

should be:

    text_obj["Text"] = "CADABRA"

And this other line:

    text_obj.text = "ABRA"

should be:

    text_obj["Text"] = "ABRA"
lordloki commented 3 years ago

Committed. Thanks for the fix.