Thursday, 13 October 2011

Week Three



Using the gun script from http://lslwiki.net/lslwiki/wakka.php?wakka=ExampleGun I made a gun that fires bananas, that will help me best out the bam door.  The task for this week is to make a door that when hit by an object it display the speed that it is travelling at, and the owner of the object.  Most of the function to do this have been covered in the other weeks.
llDetectedName(0) = Gets the Object name.
llVecMag(llDetectedVel(0)) = Gets the speed of the object.
llKey2Name(llGetOwner()) = Gets the owner of the object.

Thursday, 6 October 2011

Week Two

Greeting Script
I had to create a script that outputs the player’s name and the time of day (night evening morning afternoon) when it is touched.  I found out that one second life day is four real hours.  By using the llGetTimeOfDay function (uses seconds, 3600 seconds = 1 hour) I was able to get the current world time then put it in an if statement. As a day is four hours the first hour is night (the beginning of the day is at 00:00 night-time so I presume that it is the same in second life), the second of morning, the third is noon, and the last one is evening.
Collision Script
When the a user collides with the assign object, the script gets the name of the player and the speed at which they hit the object. The problem with this script is that when you hit the object, the chat box gets spammed with the output message. I tried to put a delay (llMinEventDelay) so that the event could only happens every 5 seconds, but it did not work.
Finder Script
 
If the owner touches the object (me) the script will use the sensor event, (and function) to find all users in 50 meters and display them to me. If someone other than the owner touches the object , it will search for all the users in a 25 meter radius of the object an display them.


Sunday, 25 September 2011

Week One Getting Started

Its been nearly a year since I last used second life, so I need to be reacquainted with the building tools.  I made a windmill using 3 basic shapes an edited their scale, rotation and positions to create the windmill. I found making the overall shape was quite easy like the last time.  I found getting back into the building tools easy as they are very simple to use.

When the player clicks the box a touch event will activate. The event will say hello to the player using the players name and starts to  count to 10.  This task took me longer than expect to complete as I had to research how to use the second life scripting language.

The box keeps count of how many times it had been touched. Every time the box is touched it will display how many times it had been touched to the person. This task took me no longer than 5 mins, as I learnt a lot for the first task.

state_entry() = When the script first comes into the world.
touch_start() = When the script is touched.
llOwnerSay() = Displays text to the owner of the script.
llGetDisplayName(llDetectedKey(0)) = Get the name of the person who touches the script.
llGetCreator() = Get the name of the person who made the script.
Timer()
llSetTomerEvent = used for the delay in the loop