Files
gymkhana-actions/docs/api/ESCEvent.md
Dennis Ploeger 58d880101d Optimized Docs (#7)
Authored-by: Dennis Ploeger <develop@dieploegers.de>
2021-06-22 23:06:20 +02:00

1.4 KiB

ESCEvent

Extends: ESCStatement < Object

Description

An event in the ESC language

Events are triggered from various sources. Common events include

  • :setup Called every time when visiting a scene
  • :ready Called the first time a scene is visited
  • :use Called from the current item when it is used with the item with the global id

Constants Descriptions

FLAG_CUT_BLACK

const FLAG_CUT_BLACK: int = 16

FLAG_LEAVE_BLACK

const FLAG_LEAVE_BLACK: int = 32

FLAG_NO_HUD

const FLAG_NO_HUD: int = 4

FLAG_NO_SAVE

const FLAG_NO_SAVE: int = 8

FLAG_NO_TT

const FLAG_NO_TT: int = 2

FLAG_TK

const FLAG_TK: int = 1

REGEX

const REGEX: String = "^:(?<name>[^|]+)( \\|(?<flags>( (TK|NO_TT|NO_HUD|NO_SAVE|CUT_BLACK|LEAVE_BLACK))+))?$"

Regex identifying an ESC event

Property Descriptions

name

var name: String

Name of event

flags

var flags: int = 0

Flags set to this event

Method Descriptions

_init

func _init(event_string: String)

Create a new event from an event line

run

func run() -> int

Execute this statement and return its return code