Make a tooltip-type feature?

Hello,
I’ve been trying all sorts of stuff with some python tutorials and logic bricks mixed together to make a simple tooltip.
I have a tooltip object prepared in a separate scene (used as overlay scene) which does indeed follow the mouse.
However, my main issue is the text parented to the tooltip object (this “object” is essentially just a plane with a background image on it). I just can’t quite figure out how to change the text whenever the tooltip object, or rather the mouse, goes over any other object in the main scene.
I’m not especially good with the python aspect (in fact, with how the BGE works as a whole), so I’m rather terribly disadvantaged here, I suppose. :confused:
Am I doing something atrociously wrong? Should all of this be happening in one scene for it to work?

It would be very great if someone could explain what’s the issue here.
Thanks in advance, your help is so greatly appreciated!!!

I think you are on the right way. It’s better to separate different systems (eg. tooltips in an extra scene).
But it could be difficult to come out without Python. First of all you’ve to think about how you want the text-object to get its text. Therefor that text has to be saved somewhere, likely in an extra text file, or - better in your case - as property on the ‘tooltipable’ objects.
Then the overlay scene has to get the property in some way. I would suggest to add an empty in your game scene with a mouse sensor on it (‘mouse over any’). Everytime it detects something it checks for the tooltip-property and then changes the text in the overlay scene.

You can find an example in the attachments :slight_smile:

Richard

Attachments

TooltipExample.blend (527 KB)

Try this simple example:
gui.blend (476 KB)

Thank you, both!
Your examples helped me understand a bit better what to do, and provided two different methods.
I think I’ve got it from here.
Thanks, once again! :slight_smile: