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

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

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

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

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

1 Like