ESCScript

Extends: Resource

Description

Represents a compiled ASHES script.

Constants

ESC_EVENTS_CONTAINER_SCRIPT

const ESC_EVENTS_CONTAINER_SCRIPT = <Object>

Members

events

var events: Variant

The events registered with the script.

parsed_events

var parsed_events: Variant

filename

var filename: String

The name of the ASHES file parsed for this script, if this script was in fact loaded from a file (as opposed to being from an internal string).

Methods


has_event_with_target

func has_event_with_target(event_name: String, event_target: Variant) -> bool

Determines whether the specified events list contains an event with the specified event name and event target, e.g. :give "filled_out_form"

Parameters

  • event_name: the event name to search for

  • event_target: the target for the specified event to check; may be null

Returns true iff events contains an event matching both event_name and event_target


get_event_with_target

func get_event_with_target(event_name: String, event_target: Variant) -> Variant

Returns the event matching the specified event name and target, e.g. :give "filled_out_form" if it exists; returns null otherwise.

Parameters

  • event_name: the event name to search for

  • event_target: the target for the specified event to check; may be null

Returns the event in events iff events contains an event matching both event_name and event_target; returns null otherwise.