Join us in Outworldz at www.outworldz.com:9000 or follow us:
Previous: Making a breedable pet Troubot Robot in Second Life
This first lesson will show you how to make a set of Nuclear powered pet feeders based on Mr. Fusion, for your breedable XS Pet Troubot Robot.
One of the ways you make money in Second Life is to sell pet food. Without food, your pets will die. As you feed the pet, they breed and make more pets that can be sold. Yet each pet still needs food, and they have to get it from you. This pet food bowl will have 168 units of food in it ( you can change it). As the food is used, the plasma level drops in the window of the tank.
Step 1 - Make a Mr. Fusion container
Create a prim, and in the object tab, set the Building Block Type to "Sculpted".
Right-click and save this texture to your hard disk:
Upload this texture to Second Life and drag it onto the Sculpt window, or click the texture and then browse to the texture that you uploaded.
Now click this texture to enlarge it, then right-click and save this texture to your hard disk:
Upload this texture to Second Life and drag it onto the texture window, or click the texture image in the editor and then browse to the texture that you uploaded.
You will need to do a horizontal offset of -0.35 to get the texture to fit the prim correctly..
Step 2 - Add the plasma container
Now make a second prim, type = cylinder.
Position and size the two prims so that they make up a Mr. Fusion and the inner 'Plasma'. Set the inner cylinder to fit inside, and make it about twice the height of the opening.
Apply this texture to the cylinder:
In my Mr. Fusion, I used the texture properties to add a shine on the fusion plasma and also a 0.1 glow of blue.
Link the prims
Edit the two pieces of the Mr. Fusion and select the outer part, the container, last. Link them together with Ctrl + L.
You will know you have done this correctly when the outer container is outlined in yellow, and the inner plasma is in blue.
Scripting the Mr. Fusion
You add the xs_foodbowl.lsl script to the outer (root) prim.
Mr. Fusion ScriptPut the xs_foodbowl_anim.lsl animation script in the inner, plasma prim.
Open both scripts and change UNITS_OF_FOOD to equal how many units the Mr. Fusion should contain before it is empty. 168 is the default, but you can set any amount.
Be sure to change the string SECRET_PASSWORD = "top secret"; to something else!
Also check that the variable PIE is set to FALSE. If set to TRUE, the system, will take a pie slice out of the plasma.
|Food||Mr. Fusion script|
When you reset the Mr. Fusion, you should see it count down to a empty container of plasma, then go back to full. If the plasma is moving upward , flip your plasma over. You will need to adjust the height of the plasma cylinder to fit the empty and full conditions.
When you (and only you) reset the Mr. Fusion tank, the tank is filled in. The Mr. Fusion 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 Mr. Fusion, you should see it show the units of food in hovertext.
Next - Part 2 - Making a Flagpole Homing Post
Back to the Best Free Tools in Second Life and OpenSim.