Is there a way to use and control text like a variable


#1

Can I mouseOver or isTouching etc. on text/string in GameLab?


#2

Yes you can mouseOver a text/string if you make it a sprite.


#3

you mean it has to be an image file?? I can’t control the actual string with functions like mouseOver or isTouching etc.


#4

You can only detect when the mouse is over a sprite, but that doesn’t necessarily mean that your sprite has to contain the text. One approach would be to create text box sprite that you’re actually checking for mouseOver, but then to use the text command to put text above that sprite. Here’s a quick example https://studio.code.org/projects/gamelab/oElraktbF5XjkAbEcWe5Zw/view