Log In  

The btn call acts very strange with the joystick where if I were to program

P1.x += btn(1)/125.5 - btn(0)/125.5

It would return the error: “attempt to perform arithmetic on a Boolean value”
Even though btn(1) and btn(0) both return numbers.

Some other things that may be of importance are that I am using the Linux version on my steam deck, and that I could not find startup.lua in my files.

P#142918 2024-03-24 18:47 ( Edited 2024-03-24 18:47)

Because lua considers 0 as a truthy value (conditions will be validated), btn and btnp returns false when it should return 0 so Pico-8's legacy behavior (truthy value when pressed) is kept.

P#144321 2024-03-24 21:04 ( Edited 2024-03-24 21:05)

[Please log in to post a comment]