Skip to content


Direct Imports

Indirect Dependencies

Defined Globals

These values are valid throughout every script that is importing PGStoryMode.lua. It is advised to not change them unless you know exactly what you are doing.

ScriptPoolCount = 0


function PG_Story_Mode_Init()

Initialises the story mode. It is a wrapper around the Define_State(...) function that ensures a valid setup for story scripts. It will use the StoryModeEvents table that has to be defined in every story script to initialise valid states.

function Story_Event_Trigger(name)

Advances the story state if a given event has been triggered.

  • string name: The story event name.

function PG_Story_State_Init(message)

The default OnInit function.