Hello!
I am trying to access the Lua scripting abilities of 3.5, but I have no idea how to open the script editor.... I am pretty sure I must be missing something super basic.
I open the designer in Voxatron, and then create a new cartridge. I get the volumetric display with nothing in it, and I can even add one of the two pre-made scripts to the middle of the room, but I have no idea how to open these scripts for editing, or how to create a new one.
Help?
In Designer, in the Objects panel (bottom-right), make a new script object.
Then just double-click the new script and put in your code there. You can use the same standard game loop functions as PICO-8: _init(), _update(), and _draw()
Then when you run your cart, those standard game loop functions will run on their own. Hope that helps!
Fantastic! It helps a lot! The internal folder structure is something I still need to wrap my head around, but at least now I have a "hello world" running!
Do you know what is the difference between the first "object" folder and the second one? As far as I can tell, they seem to be mirrors of each other.
Yes, the two objects tabs are the same and are there to make navigation easier when jumping between objects (I'm going to try and squeeze in more tabs later).
Just a quick note about the main callback functions: the ones prefixed with underscore (_draw _update _init) are single global functions that can be overwritten. So it would work even without placing the script in a room.
Scripts that belong to an object (defined inside an actor, or a script object placed in a room) use callbacks without underscores: draw update init.
I'll be posting some better documentation later this week! But here's the WIP: https://lexaloffle.com/voxatron.php?page=resources
[Please log in to post a comment]