Glow is a digital Second Life companion that follows you around and supports module addons to extend the basic movement functionality. Compared to other pets, Glow has the ability to follow the avatar around as well as crossing simulators while following the avatar.
1 June 2013
Glow evaluate 2^2+2*ln(17)
on the local chat. This plugin was designed using the Wizardry and Steamworks Shunting Yard Calculator.17 October 2012
nova→order
.October 2012
Glow Beacon
script in any attachment that you are wearing (can be a necklace, bracelet, glasses, etc…)Tools→Reset Scripts in Selection…
.[CORE]
Free wandering based on wanderer while following the avatar.[CORE]
Uses the jumpdrive crossdrive technology to teleport across great distances in the current simulator.[CORE]
Using the WSAD
keys to move Glow around.[PLUGIN]
Attack mode, using artillery, in which Glow hurls projectile at a named avatar.[PLUGIN]
Evaluates mathematical expressions using the expression calculator.Module | Syntax | Description | Example |
---|---|---|---|
CORE | Glow free | Lets Glow roam freely. | Glow free |
CORE | Glow stay | Makes Glow stay at her current location. | Glow stay |
CORE | Glow move | Asks for control permissions and then allows you to move Glow using the WSAD keys. | Glow move |
PLUGIN | nova <Avatar Username> | Hurls the [K] Plugin:Nova - Bomb object at the named avatar (usernames must be supplied, not display names). | Glow nova Morgan LeFay |
PLUGIN | evaluate <expression> | Evaluates expressions. | Glow evaluate 2^sin(10) |
Glow transits between several states, the state order
being the primary state that processes all command line parameters. A plugin uses a default
state and a state named after the plugin name. The communication between the core and the plugins is done via link messages.
Writing plugins for Glow does not require altering the core. All commands that are not to be found in the core, will be sent as a link message to the current object where, hopefully some plugin will pick the command up. If no command is registered (registering a command just implies adding the plugin in the Glow object and listening for a keyword), then after seconds, Glow commutes back to the wander
state.
The meaning of seconds is one second plus the amount of lag currently experienced by the simulator (the actual scale is reversed, where 1
represents a simulator with no lag and any value in the range represents a lagging simulator). This gives the plugin a chance to answer back and turn the core off if it so wishes.
core |state |time |time | | | | | Command | | +------+ CSV +--------+ state | CORE |--------->| PLUGIN | wander +------+ +--------+ | | | 1 + (1-Time Dilation) seconds | | glow:MAIN:HALT | | |<-----------------+ state | | order | | plugin executes... | | glow:MAIN:CONT | state |<-----------------+ wander | | plugin goes to default state | | | | | |
Glow
, Glow commutes to the order
state and does pattern matching to determine the command. If the command is not amongst the core modules, then the entire chat line is sent as a CSV
to the current object.glow:MAIN:HALT
to Glow. If that time is exceeded, Glow goes back to the wander
state.glow:MAIN:HALT
response to Glow, then upon termination the plugin has to send glow:MAIN:CONT
to Glow.order
, if either the seconds time has been exceeded, or the glow:MAIN:CONT
message has been received, Glow commutes to the state wander
.
The template below creates a dummy plugin called sample_plugin
. It is advisable to keep the PLUGIN START REGION
and PLUGIN END REGION
symmetrical in terms of initialization and cleanup. More descriptively, suppose that a plugin wants to turn physics off. It can do so in the sample_plugin
state in the state_entry
event handler. However, it must remember to turn them back on in the PLUGIN END REGION
before the plugin commutes to the default
state.
For example, the Nova plugin involves rotating Glow to face an avatar, however upon termination, the script uses llSetRot(llEuler2Rot(<0,90,0> * DEG_TO_RAD));
to rotate the object back to its initial position. Otherwise, Glow's rotation will be displaced by the last angle induced by the llLookAt
function.
// AUTHOR AND COPYRIGHT // Name: sample_plugin // Description: ... list cmd = []; default { link_message(integer sender_num, integer num, string str, key id) { cmd = llCSV2List(str); if(llList2String(cmd,1) != "sample_plugin") return; llMessageLinked(LINK_THIS, 0, "glow:MAIN:HALT", NULL_KEY); state sample_plugin; } } state sample_plugin { state_entry() { // PLUGIN START REGION } link_message(integer sender_num, integer num, string str, key id) { if(str != "glow:PLUG:HALT") return; // PLUGIN END REGION llMessageLinked(LINK_THIS, 0, "glow:MAIN:CONT", NULL_KEY); state default; } // ... }