![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](/media/41031/avapourwok.png)
not directly, but should be easy to adapt games.
see the 4th item in the faq: https://www.lexaloffle.com/picotron.php?page=faq
![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](/media/42335/sosasees-profile-picture-2024-01-16%20p8_0.png)
now i was on my computer and i couldn't find out how to close a workspace
(i also tried [Alt]+[Esc] but i found out it's an Openbox shortcut to move the active window to the back
so if Picotron was going to do something with [Alt]+[Esc] Openbox prevented it)
i hope there will be an option to close the workspace when clicking its icon with 2nd mouse button
![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](/bimg/pi/pi19.png)
This might sound dumb, but how do I reference other scripts in my main script. (E.g. player collision is in a separate script. I need to reference it in my main script.)
![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](/bimg/pi/pi19.png)
@zep I am a mac user and I LOVE picotron. CMD "r" and "s" sadly don't work. Also using alt and the arrow keys to switch work spaces also doesn't work. Thanks! BTW (CMD "C" and "V" also don't work.)
![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](/media/92447/Logo.png)
@JimboTheGod You can use require() to load other files e.g.
require("player.lua")
or require "player.lua"
![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](/bimg/pi/pi19.png)
@Soupster, thank you very much! How would I exactly do it. Do I only call it once in the "function _init()"? This is what I wrote and I am getting an error message. In this code "testfunction()" is just prints hello world in the collision.lua file.
function init()
require("collision.lua")
end
function draw()
testfunction()
end
![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](/media/92447/Logo.png)
@JimboTheGod require include() executes the contents of the file. If you have it inside _init(), testfunction is local to _init() and cannot be called outside of _init(). It would be equivalent to
function _init() function testfunction() print("foo") end end function _update() testfunction() -- Doesn't work because testfunction is local to _init() end |
Therefore, you would want to place the require outside of _init() at the top of your code, where it is equivalent to
function testfunction() print("foo") end function _init() end function _update() testfunction() -- testfunction is now global end |
![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](/bimg/pi/pi19.png)
@Soupster, thank you very much. The code works now. I realise that writing a function within a function gives a local output. I now used "iclude("collision.lua")" at the beginning of the script. Thank you very much!
![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](/media/42335/sosasees-profile-picture-2024-01-16%20p8_0.png)
yes, there is a chance of Picotron coming to Raspberry Pi.
out of Lexaloffle's standalone games (i mean games which don't run in a fantasy console), none of them run on Raspberry Pi —
although the only one with a trailer has a 15‐year‐old trailer, and Swarm Racer 3000 is still in development.
Pico‐8 is Lexaloffle's only fantasy console on Raspberry Pi, thought it's in Beta and the others are in Alpha.
[Please log in to post a comment]