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. Getting Started
  2. How to start REDscripting

Step 2: Finding the right class

What game logic will you piggyback on?

PreviousStep 1: Mod structureNextIntro

Last updated 1 year ago

Was this helpful?

CtrlK
  • Summary
  • Explanation
  • Classes (and what they do)
  • PlayerPuppet
  • DamageSystem

Was this helpful?

Summary

Created: Apr 02 2024 by mana vortex Last documented edit: Berdagon

This page will list useful classes and tell you where to find more information about them.

Explanation

When you're completely lost, how do you find the right class?

Classes (and what they do)

PlayerPuppet

public class PlayerPuppet extends ScriptedPuppet

This class is the Player and handles most of the events and logic related to player

Examples

protected cb func OnGameAttached() -> Bool

This function is called when the GameInstance is attached to the Player

DamageSystem

public final native class DamageSystem extends IDamageSystem

This class handles all the events and calculations of the damages done to all the gameobjects from all the sources

Examples

private final func ProcessPipeline(hitEvent: ref<gameHitEvent>, cache: ref<CacheData>) -> Void

This is the starting event that gets called when an object is hit and it has a gameHitEvent variable