Trigger

Trigger

new Trigger(name, data, id)

Source:

Creates a Trigger instance

Example
// returns a Trigger
const { Trigger } = require('lucid-dream');
const trigger = new Trigger('my_trigger', {}, 1234);
Parameters:
Name Type Description
name String

The name of the Trigger

data Object

An Object containing the attributes and child nodes to define this trigger

id Number

The id of the trigger

Methods

toDict() → {Object}

Source:

Encode a trigger into a dictionary

Example
// returns encoded trigger dictionary
const { Trigger } = require('lucid-dream');
const trigger = new Trigger('foo', {}, 2222);
trigger.toDict();
Returns:

An object containing the encoded trigger dicitonary

Type
Object