random

Declaration

random (max: INTEGER): INTEGER

Description

Returns a random number between 1 and max.

See Also

math functions

Example

script test_math is
  play_sound ('sound' . str (rand (10)) . '.wav')
    -- this plays any sound between
    -- sound1.wav and sound10.wav
end