Redscript
CtrlK
HomeGitHubDiscord
  • Home
  • Getting Started
    • Downloads
    • Setup for VSCode
    • Setup for JetBrains IDEs
    • How to start REDscripting
      • Step 1: Mod structure
      • Step 2: Finding the right class
  • Language
    • Intro
      • REDscript in 2 minutes
      • How to create a hook
        • Things to hook
    • Language Features
      • Intrinsics
      • Loops
      • Strings
      • Modules
      • Annotations
      • Conditional compilation
      • Configurable user hints
    • Built-in Types
    • Built-in Functions
      • Math
      • Random
      • Utilities
  • References and examples
    • Common Patterns
      • Safe downcasting
      • Class constructors
      • Hash maps
      • Heterogeneous array literals
      • Scriptable systems (singletons)
      • DelaySystem and DelayCallback
      • Generic callbacks
      • Persistence
    • Logging
    • UI Scripting
      • Logging Widget Trees
      • Popups
    • Vehicle system
    • Weapons
    • Codeware callbacks
      • Scriptables comparison
    • Libraries
    • Gameplay
      • Sleeping and Skipping Time
  • Help
    • Community
    • Troubleshooting
Powered by GitBook
On this page

Was this helpful?

  1. Language
  2. Built-in Functions

Random

Random functions

native func RandF() -> Float
native func RandRangeF(min: Float, max: Float) -> Float
native func RandNoiseF(seed: Int32, max: Float, opt min: Float) -> Float
native func RandRange(min: Int32, max: Int32) -> Int32
native func RandDifferent(lastValue: Int32, range: Int32) -> Int32
native func CalcSeed(object: ref<IScriptable>) -> Int32
PreviousMathNextUtilities

Last updated 3 years ago

Was this helpful?