Standard Events
| Event | Description |
|---|---|
| Logon | A user establishes a session with a Hub |
| Login | A user wears their Mesmerizer, or logs in to SL while wearing their Mesmerizer |
| Logoff | A user's session with their hub times out |
| Address | A connected hub allocates a new HTTP address |
| Location | A user moves within SL |
| Update | Periodic "keepalive" event |
| Menu | User makes selection from a menu |
| Custom Event | User's Mesmerizer invokes the signal command |
| Event | Notecard(s) | Variables |
|---|---|---|
| Logon | Logon:<name> | name |
| Login | Login:<name> | name |
| Logoff | Logoff:<name> | name |
| Address | Address:<hubname> | hubName, hubAddress |
| Location | Location:<name>:<sim> | name, location, sim, x, y, x |
| Update | Update:<name>:<sim> | name, location, sim, x, y, x |
| Menu | Menu:<name> | name, data |
| Custom Event | Event-name:<name> | name, data |
Custom Events
In addition to the standard events listed above, a Mesmerizer can use the signal command to create custom events within The Enforcer it's connected to.
signal takes two parameters - the name of the event to generate, and a "data" parameter. Within The Enforcer, the event name, along with the Mesmerizer wearer's name will be used to select a notecard, just as with the standard events above. Note that currently, the sim-name is not automatically sent the The Enforcer as part of the custom event, so it cannot be used to select a response notecard.
Among other things, custom events allow for any standard Mesmerizer event to be turned into an Enforcer event. For example, let's say you want to run an Enforcer program whenever a user teleports. While the Mesmerizer supports the on-teleport event, this event is purely local - it's not signaled back to The Enforcer. But you can create an event-handler within the Mesmerizer that will signal it, for example by using the following Mesmerizer trigger:
on-teleport = internal signal "Teleport" "$location"
When the Mesmerizer wearer teleports, this local trigger will fire, and it will signal a "Teleport" event to The Enforcer. Within the notecard that The Enforcer selects to respond to this Teleport event, the data variable will be set to the current location of the wearer.
No comments:
Post a Comment