Print to game window?

Hi people, so I’m able to write code that prints something to the system console during a game, but is it possible to print that text to a position in the game window instead of the console?

Thanks for any help :slight_smile:

Either you can use python and either bgl or bgui, or you can use a text object (potentially on an overlay scene) and just change what it says (with ’
’ for enters)

I’d probably go the second route, because it’s easier to control where it goes. (in my mind at least)

Select text object from the add menue.
Copy and paste this code in blenders text editor.Then change what it says in quotation marks but keep the quotation marks.Then name it what you like.Then go to the blender game engine logic editor.Make a always sensor then connect to a python controller.Then select the text you named from python controller’s menue.

import bge
own = bge.logic.getCurrentController().owner
own.text = "What is that?" 

Thank you both, but especially 3d solar system builder. Works perfectly. :smiley: