Let's say there are three texts on the game screen.
Game Start
High Score
Exit
I want start game when Game Start is clicked. Is it impossible? Should I use btn and btnp?
Read up on the stat function at the Pico 8 wiki - you can activate the mouse then check its position on click.
You can save this cartridge and use it's functions freely as you wish, editing to your own needs.
The basic idea is to keep all of your text elements in a table so you can keep up with them.
Then keep up with the state of the mouse.
Then check if the mouse is within the boundaries of any of the text elements, if it is then change that element's "over" variable to true.
Then you can just do whatever if(text_element.over==true) or if the mouse button has been pressed or released AND the text element's over is true.
[Please log in to post a comment]