Do you think you can explain how the "random" function works/how to use it? I've read the manual and tried to look through the code for Garlicscape, but I can't wrap my head around it.
As far as I understand it, which is probably not that far ;), random takes a bitmask as an argument. The bitmask is a value that gets ANDed with a random number from 0 to 255. So:
v0 := random 0xFF # v0 is a random number from 0 to 255 v0 := random 0x01 # v0 is randomly 0 or 1 v0 := random 0x07 # v0 is a random number from 0 to 7 v0 := random 0x08 # Careful: v0 is randomly 0 or 8 ;)