Looking at the rnd() function in Pico-8 and using it to set variables to random locations and also for determing whether events should happen at random. There is also a discussion of the flr() function.
No download links available.