User Tools

Site Tools


LSL Corrade Controller

This is an overview of how the LSL controller for Corrade works. I've based it on the Corrade example written by JP Bluebird (Bluebird Designs) originally for PandoraBot interfacing, copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3. Just email me if you'd like a copy of the code, will post it up once more robust.


  • Unordered List ItemThe code rapidly expands to exceed the script limits for SL, so I need to compartmentalise it.

To Do:

  • Unordered List ItemCompartmentalise

The main flow is:

  • listen on public chat (channel 0)
  • get an inbound URL so Corrade server can talk to it
  • if hear chat trigger sensor to find where user is (so can turn towards)
  • once sensor returns with speaker (and bot) position:
  • - turn to speaker
  • - if local command then process using LocalCommandHandler()
  • - otherwise (and if on public chat) send received chat to remote brain using an ASML message in web service
  • if receive a PUSH web services message:
  • - if URL assignment then let Corrade know using Corrade_DefaultNotify()
  • - if command from corrade then execute (eg to find objects - WHY?)
  • Send the sensation to the remote brain using a web service call (sendASML)
  • Get response from web service as two curly brackets elements (easier in SL than XML!)
  • Send any chat element - “answer” - to the bot using MyActions_Chat
  • Send any action element - “action” - to the action handler - ActionHandler(actions)
  • Wait for next event!

In addition:

  • Local commands are parsed by LocalCommandHandler() which then calls the appropriate Corrade or MyActions function
  • MyActions functions consist of compound Corrade calls needed in sequence, eg chat is face user,start typing,display chat,stop typing
  • Corrade actions exist for each basic avatar action, command or request (or will do). They send a key-value pair (KVP) encoded message using llInstantMessage to the bot avatar (referred to by UUID in gCORRADE, and with Group/Group password authentication), with a URL encoded “message” within the KVP in the message portion of the InstantMessage!
lsl_corrade_controller.txt · Last modified: 2020/01/21 14:00 by admin