Log In  

Is it possible to print things to the console?
Also, how do you reference objects in a script?

P#88522 2021-03-04 10:17


If you launch Voxatron from the command line, printh will print to stdout.

Finding an actor in a script:

function _draw()
    set_draw_slice(120, true)
    local p = get_actors(PLAYER)[1]
    if p then
        x,y,z = p:get_xyz()
       print(""..flr(x)..","..flr(y)..","..flr(z), 20, 50, 10)
P#88523 2021-03-04 12:12 ( Edited 2021-03-04 12:24)

Wdy mean by launching Voxatron from the command line? I'm sorry for all the questions but I can't really find any good documentation on the game. The API doesn't tell me anything I want to know

P#88536 2021-03-04 14:52

Running Voxatron from the command line

  1. Open a terminal window (aka command console)

  2. then...


cd Voxatron.app/Contents/MacOS

Windows (untested)

C:\Program Files (x86)\PICO-8\pico8.exe

I'm running on a Mac and the above will launch Voxatron. Any printh statements in your code will output to the terminal window.

P#88537 2021-03-04 14:59 ( Edited 2021-03-04 15:06)

Running vox through the command line will launch the game, but print statements don't show up in the terminal window.
I'm on windows btw

P#88562 2021-03-05 03:45

printh, not print.

  • print is for rendering text in a running game.
  • printh is for sending text to stdout.
P#88563 2021-03-05 04:22 ( Edited 2021-03-05 12:33)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-09-28 11:21:43 | 0.007s | Q:12