Join us in Outworldz at www.outworldz.com:9000 or follow us:

Make a Breedable Pet Food Bowl for Second Life

This is Part 1 - Making a food bowl for a breedable pet in Second Life.

Completed food bowl Previous: Making a breedable pet in Second Life

This first lesson will show you how to make a set of basic pet food bowls for your breedable XS Pet quail.

One of the ways you make money in Second Life is to sell pet food. Without food, your quails will die. As you feed the quail, they breed and make more pets that can be sold. Yet each pet quail still needs food, and they have to get it from you. This pet food bowl will have 168 units of food in it. As the food is used, a pie-shaped wedge appears in the inner part of the food bowl:

Assembled

Pie shaped food bowl ( untextured ) with 10% of the food eaten

Step 1 - Make a prim

Create a prim, and in the object tab, set the Building Block Type to Sculpted. Right-click and save this sculpted bowl texture to your hard disk.

food bowl sculpt

Upload this texture to Second Life and drag it onto the sculpted texture window, or click the texture and then browse to the texture that you uploaded. A bowl shape will appear.

Click the button for 'Inside-Out'.

In this photo, I colored the bowl blue.

Photo

Now make a cylinder prim:

Cylinder prim

Right-click and save this food texture to your hard disk. Upload this texture to Second Life and set the texture on this prim by browsing to the texture that you uploaded.

food texture

Position and size the two prims so that they make up a food bowl and food. In my food bowl, I used the texture properties to add bumpiness of bricks and a low shine on the bowl, and I also added a steel texture with some blue coloring to the bowl to make it pop and have some roughness.

Textire food bowl

This is the completed food bowl:

COmpleted food

Edit the two pieces of the bowl and select the food bowl last. Link them together with Ctrl + L.

Now you can add the food animation script to the food prim. We will add the scripts in the last step.

You can also make this bowl another shape:

I decided to make this one look like a can that the birds have discovered and are eating from.

It is made from two prims, just like before, only this time they are both cylinders. The bowl has a hollow so that the rim will peek over it:

Here is the label for the outer bowl:

bird food label

I used a round cylinder instead of a sculpt, with a hollow to allow the food cylinder to show as if the can was left out and the birds have discovered it.

Food Bowl Script

Put the food bowl animation script in the food prim, and then put the food bowl script in the pan.

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

You can also edit the xs_foodbowl script and change the FOOD_TYPE to 1. Type 0 is normal food. Type 1 will make your pet glow when it is eaten.

If you are using the original code, be sure to change the key YOUR_UUID = "00000000-0000-0000-0000-000000000000"; to your avatar key. If you are using my modified scripts, you can skip this step.

Open both Food Bowl scripts and change UNITS_OF_FOOD to equal how many units the food bowl shoukd contain before it is empty. 168 is the default, but you can set any amount.

Food Food Bowl script
Food bowl contents food bowl script

Testing

When you reset the food bowl, you should see it count up to a full bowl. When you (and only you) reset the food bowl, the food is filled in. The food bowl is ready to sell after it is full. You really should test this after you finish the tutorial with an alt or a trusted friend.

When you touch the food bowl, you should see it show the units of food in hovertest


This short video shows what happens when you reset the script.

Permissions

Be sure to make the food bowl Non-Copy and No-Mod! Make the scripts no copy and no mod, too. Always make these permission changes while the bowl is in-world, and never in inventory. If you change permissions in inventory, they will not take effect until after they are rezzed by your buyer. So the copy/mod/transfer switches on the one they purchased will still be at the default permissions, and they have unlimited food bowls.

Next - Part 2 - Making a bird homing post

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