Redscript
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
  1. Language
  2. Built-in Functions

Utilities

PreviousRandomNextCommon Patterns

Last updated 1 year ago

Was this helpful?

CtrlK
  • Enum
  • Localization
  • Target search

Was this helpful?

Enum

native func EnumGetMax(type: CName) -> Int64
native func EnumGetMin(type: CName) -> Int64

native func EnumValueToString(const enumStr: script_ref<String>, enumValue: Int64) -> String
native func EnumValueFromString(const enumStr: script_ref<String>, const enumValue: script_ref<String>) -> Int64

native func EnumValueToName(enumName: CName, enumValue: Int64) -> CName
native func EnumValueFromName(enumName: CName, enumValue: CName) -> Int64

Localization

native func LocKeyToString(hashKey: CName) -> String
native func GetLocalizedText(const textKey: script_ref<String>) -> String
native func GetLocalizedTextGanderDepened(const textKey: script_ref<String>, variantIsFemale: Bool) -> String
native func GetLocalizedTextGanderDepenedByKey(hashKey: CName, variantIsFemale: Bool) -> String
native func GetLocalizedTextByKey(hashKey: CName) -> String
native func GetLocalizedItemNameByString(hashKey: CName) -> String
native func GetLocalizedItemNameByCName(hashKey: CName) -> String

Target search

native func TSF_All(mask: TSFMV) -> TargetSearchFilter
native func TSF_Any(mask: TSFMV) -> TargetSearchFilter
native func TSF_Not(mask: TSFMV) -> TargetSearchFilter
native func TSF_And(tsf1: TargetSearchFilter, tsf2: TargetSearchFilter, opt tsf3: TargetSearchFilter, opt tsf4: TargetSearchFilter) -> TargetSearchFilter
native func TSF_Or(tsf1: TargetSearchFilter, tsf2: TargetSearchFilter, opt tsf3: TargetSearchFilter, opt tsf4: TargetSearchFilter) -> TargetSearchFilter