RedNodeEditor
  • RedNodeEditor
  • Interface
    • Node list
    • Graph editor
  • Usage
    • Base nodes
    • Variables
    • Custom events
    • If statement
  • Building and using mods
    • Exporting and loading a mod
Powered by GitBook
On this page
  • OnSdkInitialized
  • OnWorldUpdate
  • OnGameStart
  • Additional base nodes
  • OnInitializeMod
  • OnUpdate
  • OnFixedUpdate
  1. Usage

Base nodes

PreviousGraph editorNextVariables

Last updated 1 year ago

When first opening the program or creating a new project you will be presented with three red colored nodes, which I called base nodes. Those are:

  • OnSdkInitialized

  • OnWorldUpdate

  • OnGameStart

Realistically if it's the first time you would only need the last two, so you can delete OnSdkInitialized and always re-add it later.


OnSdkInitialized

This node is almost always used to setup things which require to be executed only one time like:

  • Creation of an UI

  • Registering of sound files

  • Initializing variables


OnWorldUpdate

All the nodes attached to OnWorldUpdate will be executed continuosly while playing in the world. Nodes listening to inputs like GetKeyDown or where you want them to continuosly be called should be put in here.


OnGameStart

All the nodes attached to OnGameStart will be executed once at about half of the loading screen (when the player instance is created). If you happen to switch savegame or reload the same save without closing the game, the node will be called again, executing each attached node.


Additional base nodes

Apart from the three starting ones, there are other base nodes which can be added to the graph. Those are:

OnInitializeMod

Currently doesn't serve any purpose. It's normally used to create the config file for the mods (.cfg), which isn't currently supported in the editor. It's also the first base node to get executed, so it could be used to initialize variables if these are needed in OnSdkInitialized, which is the next base node to get executed.


OnUpdate

This works exactly the same as OnWorldUpdatewith the only difference that it always gets executed, independently if you are in the game, in the main menu, etc.


OnFixedUpdate

This node is mainly used for physics based calculations, like moving objects around using rigidbodies. Using it instead of OnUpdatecan prevent unwanted behaviors like laggy movement when working with physics.

Page cover image