Philip P. Ide

Author, programmer, science enthusiast, half-wit.
Life is sweet. Have you tasted it lately?

User Tools

Site Tools


blog:opensim:cortex_ai:cortex_commands

Command List

Note: This is a living document and will be updated each time commands are added or changed. Last Update: 2026-Jan-01 15:11

Commands may have parameters, which are separated by a pipe, e.g. anim|dance1.

Control

  1. label|s creates label s
  2. jumpto|s go to label s. Can go forwards or backwards through action sequence
  3. end|s removes everything from label s to the end statement from the action sequence
  4. stop disable use of the main action stream
  5. start continue use of main action stream from last action
  6. rand|max picks a random number between zero and max; max can be zero.

Talk

  1. say|c|s where c is a channel and s is the text to say
  2. sayto|k|c|s as for say, but k is the key of the avatar/object to speak to
  3. shout|c|s where c is a channel and s is the text to shout
  4. whisper|c|s where c is a channel and s is the text to whisper
  5. convo|name|script where name is the name of an actor and script is the name of a script to run

Conversation scripts contain markups such as %fname% which get replaced at runtime, and puppet both the primary actor (who enacts this command) and the named actor. It is necessary for both actors to hold their part of the conversation, so this is non-trivial to setup.

Motion

  1. moveto|target where target is a vector. Instant travel to target pos
  2. flyto|target where target is a vector. Fly to target pos and land
  3. rot|r where r is the rotation to orient the actor
  4. run|target where target is a vector to run to
  5. walk|target where target is a vector to walk to
  6. stopmove stops a moveto
  7. tp|target|lookat where target is a vector to teleport to and lookat is an optional vector
  8. gth|f where f is the height (as a float) to go to. Useful for faking elevator teleports
  9. rise|f where f is the height (as a float). This adds f to the current elevation. Can be negative to lower

It is notable that both gth and rise will ignore obstacles to place the actor at the required height. It is as if the actor becomes phantom during the transition.

Animation

  1. anim|x where x is the name of an animation file, which must exist in the actor's prim inventory
  2. lookat|t|target|o where t is 0 or 8 (NPCLOOKAT_NONE or NPCLOOKAT_FOCUS), o is an offset vector from target
  3. sit|k where k is the key of the object to sit on
  4. stand to unsit
  5. stopanim will stop the currently running animation

Actions

  1. appearance|k where k is the key of an appearance notecard
  2. despawn remove actor from scene (may be replaced on next fetch!)
  3. play|sound1|sound2 where sound1 & sound2 are keys to sound files, and sound2 is optional
  4. touch|k|p where k is the key of the object to touch and p is the optional prim number (default: root)
  5. wait|n where n is seconds of real time
  6. waituntil|t where t is a timestring as hh:mm or hh:mm:ss representing apparent time in the current frame
  7. waitto|u where u is a time in unixtime. Waits until that moment

Puppeteer

Puppetering commands are broken into those enacted by the controlling actor, and those that are enacted by the puppet. For the controlling actor, commands for self are normal commands. Commands intended for the puppet are the same as above but with the prefix pup. When a command is sent to the puppet, the pup prefix is stripped - therefore the puppet receives normal commands and does not know the difference. The following are commands specific to puppeteering and may be utilised by both the puppet and the puppeteer.

  1. inject|s inserts a series of commands into the action sequence
  2. actor|k key of actor listener to puppeteer
  3. load|k loads a file of commands where k is the key of the file

In theory, an actor can instruct a puppet to puppeteer another actor, but that would probably not be a good thing. Like crossing the beams.

The inject command creates an automatic label at the beginning of the injected commands and end at the end of the injected commands, which forces the injected commands to be removed from the action stream once they have been completed. The actor can then resume normal actions where they left off.

Note that individual commands can be injected by the controlling actor if a stop/start sequence is issued.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies

Discussion

Enter your comment:
H U U N O
 
blog/opensim/cortex_ai/cortex_commands.txt · Last modified: by Phil Ide

Except where otherwise noted, content on this wiki is licensed under the following license: Copyright © Phil Ide
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki