Need Help with Python in Blender Game Engine
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.