Need Help with Python in Blender Game Engine I'm new to python code I usually use logic bricks in blender code. I wanted to use python more in my games and I need help in a bit of code. I want it to say that once I collide with an object it will come up with text saying Game Over or Wrong way, etc. Does anyone know how to do this?
Okay,

I'll give you an example of what you could do.

Add the collision sensor as you normally would, the way you want it, but named "Collision" and set to true pulse triggering, and connect that to a python controller with your script (eg. "Text.py"). You also need a text object, named "Text", with a Game Text Property.

Collision Sensor -----&gt; Python Controller


Then, inside the script (eg. "Text.py"), type the following:

from bge import logic

cont = logic.getCurrentController()
own = cont.owner
sce = logic.getCurrentScene()

collision = own.sensors["Collision"]
text = sce.objects["Text"]

if collision.positive:
    text["Text"] = "Wrong Way!"
else:
    text["Text"] = ""


Tell me if you need any more help.