generates a random number between 0 and a certain maximum value and assigns it to <gamevar>. With EDuke32 revisions prior to r2105, the maximum values may differ between EDuke32 builds produced with the GCC and MSVC compilers, and/or operating systems. Revisions r2105 and up always generate numbers from 0 to 32767 (inclusive).
displayrandvar <gamevar> <maxvalue_constant>
displayrandvarvar <gamevar> <maxvalue_gamevar>
The displayrandvar commands limit the number to be between 0 and <maxvalue>, inclusive.
Since this function is sync safe, it can be used in unsynchronized code.