Page tree
Skip to end of metadata
Go to start of metadata

When a program with a script is loaded into the Slot Rack, the global statements, all parameters and the onLoad, onLoadIntoSlot and onInit callbacks must be initialized. The order is as follows:

#Initalization ofDescriptionThread
1.Global statementsGlobal statements are any expressions outside a function call.Controller
2.ParametersAll parameters of the program, including the parameters that you defined in the script.Controller
3.onLoadThis callback function is called when the script module is loaded as part of a preset or project.Controller
4.onLoadIntoSlotThis callback function is called when the program is loaded into the Slot Rack.Controller

This is the first callback function that is called when the processor thread is initialized.


For more details about threads, see Threads in HALion.


-- script for testing the initialization when loading a program into the Slot Rack

function onInit()
  print("onInit")  -- This is printed last, after onLoadIntoSlot.

function onLoadIntoSlot()
  print("onLoadIntoSlot")  -- This is printed after onLoad.

function onLoad()
  print("onLoad")  -- This is printed after the global statement.

print("Global statement") -- This is printed first.

1 Comment