Sunday, 6 November 2011

Week 7

My First Gesture
This week we need to make are own custom gestures, using the animations that are already in second life. Gestures give the avatars move life/personality. If I wanted to I could use gestures in my assignment, when a player scores a point they could jump up in joy, it just adds that little bit more life to the game. The gesture I made this week is a mix between the point and finger wag animations. I put a wait in between the two animations, so the second animation does not cancel the first one out. I set the wait for 1.5 seconds so it will switch to second animation half way though the first one.

Qavimator
I tried out Qavimator, what is used to make animations for second life. I used the timeline to change the position of the bones over time. I don’t think I will be using Qavimator to do animations for my assignments, as I don’t plan to have any avatar animations for my game.

Tuesday, 1 November 2011

Assignment Game Idea

My idea for the assignment is to make a two player ice hockey game, but with a twist. The arena will be big and the players will be sitting on a rectangular prim. The prim will move left and right with the arrow keys or ‘A’ and ‘D‘. Player one starts off by shooting the puck, trying to hit one of 3 holes on the other side that belongs to player two. Player two need to defend their goals by blocking the puck, but also try to shot it into player one goals. Every time the puck hit’s a goal the other player gains a point, and the player who lost the points gets to shot the puck for the next round. In the middle of the arena are cylinder prims that will move up and down randomly, that will try to distract the player, but also could rebound the puck back into their goal. Power ups will also appear on the arena. There will be 3 types of power ups. The first power up puts two pucks in the arena, in till the second puck has been scored with. The second power up speeds up the puck . And the third power up puts loads of decoy pucks on the field for 29 seconds. I will not know in till I test these power ups out, but I believe they will add to the funny of the game, giving it a different feel to normal ice hockey.

Sunday, 30 October 2011

Week 6

HUD
For this week’s task I had to make a HUD that controls a box. The problem I had when making the HUD was the size, you need to make very small prims, as you cant resize the objects when you attach it as a HUD.

I made 4 classes for each of the moment buttons. The Class shouts the word left on a channel that I selected. The good find about the channel is that other people will not hear it.


This script listens to the channel I selected for each of the buttons. If any of the key words are used like back or right, the object will move in that direction. I think this would be usefully for sending dater between scripts.

Thursday, 27 October 2011

Week 5

Lists
The first task for this week was storing information in a list, when a player hits the object. When the owner touches the object, the object will tell the owner what’s stored in the list.

When a player or object has finished colliding with the script, the script will save information of the object that collided with the script in a list. When the owner touches the object, the list will display all the information it has got, one line at a time.


Notecards
The second task was for an object to read a note card that contains vector positions. Once the positions points are read, the object will move to them every time some one touches the object.

The script makes use of states. States are good if you want to use the object in a different way once a certain criteria has been meet. 


llSetText()

I was testing out the llSetText function that lets you put hovering text above an objects. You also get to select what colour the text is, what could be useful for team games.

Thursday, 20 October 2011

Week 4

For this week’s tasks I need to move a physical and non physical object in second life. The script I wrote moves a physical object to the second closest player near it. The script will not work if there is only one player in the area. The main reason I did this was because I wanted to test out moving an object to another object instead of to me.
llDetectedPod() = Get the position of a object/player
LlMoveToTarget() = moves the object to the selected location at a speed of my choosing.
The second script moves a non-physical object., but the difference with this one is that it does not move over time. But instantly jumps to the position.  When this script had been touched it will jump to four different locations over the course of 8 seconds.
llGetPos = Gets the current position of the object.
llSetPos = Set the position of the object instantly.

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.