Log In  

how do i make a test for the game (e.g. make something that changes graphics to a button pressed or when button pressed print anything)

P#90910 2021-04-21 21:29

1

If I understand your question you are asking how to add button input to your games. You can have button input
by using the pico 8 functions btn() or btnp(), btn() checks if a button's pressed and btnp() checks if a button's pressed for one frame.

In the btn() and btnp() functions you put 0 for left key, 1 for right key, 2 for up key, 3 for down key, 4 for z key, and 5 for x key

Code example:

if btn(5) then
print("Button x is pressed! Yay!")
end

Hope this answered your question if it didn't here's the pico 8 cheat sheet which will tell you much more about pico 8
https://www.lexaloffle.com/bbs/?tid=28207

P#90912 2021-04-22 00:43

thanks

P#90913 2021-04-22 00:58

[Please log in to post a comment]