Join us in Outworldz at or follow us:

Make a Breedable Pet Troubot Robot Homing flag for Second Life

This is Part 2 - Making a Breedable Pet Troubot Robot Flag in Second Life.

Previous: Making a breedable pet Troubot Robot Mr Fusion for Second Life

Your pets need to know where 'home' is. The home position is set by rezzing a 'homing' prim and touching it. Each breedable pet will always stay near this post. The original XS Quail homed to a small half-sphere. I chose to make this a flag. Yes, I know flags don't blow in the wind on the moon!

There are obviously other choices, such as a radar antenna or just a small prim post. I picked the flag because it is simple, it shows another of my scripts in action, and it was only two prims. The radar antenna seemed like it would take more prims. You can take the homing post up after 'homing' your pet, but it is best to leave it down.

New-born pets need to know where the post is. Without the post, they will not move.

Make a 1 meter flag pole

Make a cylinder prim 1 meter tall X 0.050 X 0.050 wide and thick. Stand this vertically to make a flagpole.

The next thing you will need is one of these images:

As it appears The file you need: click to get the largest one:

Go ahead and right-click and save the texture to disk, and then upload it to Second Life. Keep the name the same. The script that is used will read the numbers in the name and animate the flag correctly.

Make the flag

Now make a rectangular, flag-shaped prim. This will be the flag prim. I made my flag 0.5 meter wide by 0.4 meter tall by .010 meters thick.

Make a copy by pressing shift and edit moving it so that there are two rectangular prims:

Link the prims correctly

Select the flags, then select the pole, and link them together so that the pole is the root prim. The pole should be outlined in yellow after this step.

Now add the selected flag texture ( from the table above, in the right-hand column) to the contents tab of the prim where scripts go

Scripting the Flag

You must add the 'waving flag' script to each of the the flag prims. This script will automatically read the numbers in the name of the texture and animate the flag.

Once you have loaded the script and seen the flag wave, you can delete the script.

If you are curious as to how this was made, I used the gif_2_SL_animation_v0.6.exe program on an ordinary animated GIF I found on Google image search.

You will see two waving flags:

Position them so they appear correctly, and color the back of each flag transparent or set the Alpha to 1.0:

Edit the Description

You must add to the flagpole a description consisting of a number such as 5. This number is how far away the pet can be from a Home post and still find the home location. Without this number, your pets will 'freeze' and will not move.

Scripting the Flagpole

Edit the pole and add the xs_home script to it.

Be sure to change the string SECRET_PASSWORD = "top secret"; to something else!

Name the Flagpole

Name your Object 'Home Flag'. This Object must have that name. If you change the name to something else, then you must change the name in the Globals section of all script:
            string HomeObject = "Home Flag"; 


Set the permissions on your scripts to NO Modify so that no one can see your scripts. The post should be set to allow other users to copy.

Take a copy of the Homing flag back to inventory. You will add this to the animal in a later step.

Next - Part 3 - Make a Make breedable pet Troubot Robot in Second Life

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