Manage Text Events¶
Adding a new Text Event¶
- Select
Text Events
and clickAdd Event...
and a new window will appear. - Enter a name for the new event.
- Enter a pattern for the new event. The pattern can include
#*#
for wildcard matches or#1#
for named matches. Named matches will be passed as arguments to the event handler function. - Optionally, set a category for the event.
- Implement the handler function for the new event. Template code is provided, including a function
event_handler
. The function arguments should be updated to match the number of arguments matched in the event pattern. The first argument to the event handler is always the complete line which matched the pattern. - Optionally, also implement the
on_load
function if you would like any actions to be performed immediately upon the event being enabled. - Click
Save
to save the new event.
Editing Text Events¶
- Select
Text Events
and find the event you wish to edit. - Select the event and click the
Edit
button. - Make updates to the event in the new window that appears, and then click
Save
.
Viewing Text Events¶
- Select
Text Events
and find the event you wish to edit. - Double click the event you wish to view and a new event viewer window will appear.
Removing Text Events¶
- Select
Text Events
and find the event you wish to edit. - Select the event and click the
Remove
button.
Toggling Events¶
Events can be enabled or disabled for a given character.
Using the UI¶
- Select
Text Events
and find the event you wish to edit. - Check or uncheck the box next to the event name to toggle the event.
Using the Command Line¶
- Run the command
/lem text event_name 0
to disable the event namedevent_name
. - Run the command
/lem text event_name 1
to enable the event namedevent_name
.