Action
Action declares an action.
Overview
action is an alias for act.
It creates callable logic exactly the same way.
action greet(name) :say("Hello, {name}!") xx
action greet(name) :say("Hello, {name}!") xx
Calling the action:
greet("Goblin")
greet("Goblin")
Output:
Hello, Goblin!
Hello, Goblin!
Equivalent to act
The following examples are identical:
act greet(name) :say("Hello!") xx
act greet(name) :say("Hello!") xx
action greet(name) :say("Hello!") xx
action greet(name) :say("Hello!") xx
Goblin documentation generally uses act because it is shorter.