Join us in Outworldz at or follow us:

This is Part 9 - Animate XS Pet Troubot Robots in Second Life

Previous: Modify a breedable pet Troubot Robot in Second Life

How to animate your Troubot Robot

You can add 4 animations to your pet robot to get it to stand, walk, sleep, and look.

Step 1: You will need to give birth to a robot, and reset the xs_brain script.

Step 2: Position your robot prims so that it is standing vertically in a 'Stand' pose.

Step 3 - Add a blank note card named "Movement"   Add the Compiler script.

Step 4 - Add the Animator script.

Step 5 - Click the robot. You should get an animator menu:

You can animate any prim except the root prim, which is the invisible base prim that Troubot is walking on. Here is a photo of Troubot with the root prim


I find it very easy to animate if I set the base prim to a rotation of <0,0,0>, and to set the prim to some standard , even Grid numbers. You do not have to do this, it just makes it easier to recover from mistakes in editing.

The 'stand' recording

Click the [Name] menu item. The system will chat instructions to you for a channel to use.  A piop up box will appear asking for the name of the animation.

Troubot: Type the current animation name on channel /600

Type 'stand' into the dialog box:

The script will chat this:

Troubot: Position all child prims, then select the Menu item 'Record', and 
repeat as necessary. When finished, click 'PlayBack' to play back the animation, 
or click the animation name. Click 'Name' to start a new animation sequence

The menu will re-appear. You can click ignore or leave it open.

Edit the Robot and then select the Edit Linked Parts checkbox.

Press and hold shift and unselect the base. All other prims in your Robot should be highlighted. Move these prims very slightly so that the recording process will see that their positions have changed slightly.  This will establish a baseline animation.  The scripts will always play back this baseline animation before doing any other animations. This lets you move a small piece of the pet instead of the entiore pet for each animation, and takes up much less memory.

Now click the [Record] button and your first animation is complete!

The Menu will now have a [stand] button.

The 'left' walk recording

Click [Name] again

Enter the name 'left' into the dialog box.

Position the left leg forward, the right leg back, and make the arms the opposite: I also turned the head slightly to one side:

Click [Record]

Now click the menu item for [stand]. The robot should place itself back in the standing position.

The 'right' walk recording

Click [Name] again.

Now enter the word 'right' into the dialog box.

Position the right leg forward, the right leg forward, and make the arms the opposite.

Click [Record]

Now click the menu item for [stand], then [left] and [right] and you will see how it looks when walking.

The sleep position

Click [stand] again to get back to the default position.

Click [Name] again

type in 'sleep'

Now position your robot as if it were sleeping. You can move any prim except the base.

I chose to make mine prop his head on his arm:

Click [Record] to save your sleep position

The [wave] position

The Robot has an animation for when you click the Home post, or when a female or make sees a chance to to breed.

Click [stand] to get the Robot back to the default position.

Click [Name] again

type 'wave'

Now position your robot as if it were starting to wave an arm

Click [Record]

Now click [Pause], Enter in a number such as 500 for 1/2 second delay,  and move the arm again. Pause will add a short delay.

Click [Record].

You can also move the head up and down, and if your belly band is large enough, move the stomach apart. Add pauses and make him wave both arms.

Saving your animations

When you are done, you will no longer need to save the animations in the note card "Movement". Instead, click "Compile"

A large bunch of text  will appear in chat. Widen your chat window so you can see, and copy all the text where indicated.

Highlight all these lines and press Ctrl-C to copy them. You want every line from the one that is labeled 'start' all the way to the end.

Now paste these into a new script.  You can  give this script any name.

These is a test script named "DEBUG prim animator timer.lsl" in the zip file. Add this script and your Robot should stand, walk, sleep and wave

Delete the "DEBUG prim animator timer.lsl" script.

The Final Step

You can delete the animation and compiler script when the tests pass.

Here is a video showing how the pet Troubot Robot moves, and how the eyes change.

Once you add these, you cannot add any prims to your Robot. You will not be able to adjust any individual prims except via animation. But you can shrink or grow the entire Robot after this step, before you package it. Remember to replace ALL of the Troubots in both of your spaceships. You need to package the Troubot and re-rez it so that he has an egg and a copy of the Troubot in it.

The instructions for doing this are in the article on Modifying Your Pet Robot

Here is a set of Troubots living on a mars prim:


I hope you enjoy your new pets! Plese send me pictures to fred at and tell us how you are doing with your own pet animal!


Back to the Best Free Tools in Second Life and OpenSim.