Log In  

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?

P#51482 2018-04-10 03:56 ( Edited 2018-04-10 14:05)

:: Davbo

Read up on the stat function at the Pico 8 wiki - you can activate the mouse then check its position on click.

P#51483 2018-04-10 05:30 ( Edited 2018-04-10 09:30)

Cart #51485 | 2018-04-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

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.

P#51487 2018-04-10 07:04 ( Edited 2018-04-10 11:07)

oH TAHNK YOU EVERY BODY

P#51493 2018-04-10 10:05 ( Edited 2018-04-10 14:05)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-06-06 11:26 | 0.016s | 4194k | Q:31