Trigger
Contains runnable code for the member.
The trigger is a common long-form entry that contains a member's runnable code, typically the code that will be run when that member is triggered.
Function Trigger
Second Tab
1
function example_function:
2
trigger: // anything indented below this is inside
3
if "hello" is a string:
4
return 12
5
return 64
6
something: // this is no longer in the trigger
Copied!
1
on load:
2
trigger:
3
print "hello" // inside trigger
Copied!
The trigger cannot be used as an inline header, and must have a : colon and an indented section below it.
The trigger contains all of the body code of a function or other executable member.
Copy link