Archive for October, 2010

Data and Lists

Posted in Uncategorized on October 27, 2010 by veraska

For this week, we were asked to create data, and create a list function. This was done through the use of a list function in code, and then we were meant to add data into it as well as record it.

The easiest thing to do was to record the velocity and name of the person that collided with the object, and so I did just that.

The code is following below…

##############################

list mylist = [];

default
{

state_entry()
{
// llSay(0, “Hello, Avatar!”);

}

collision_start(integer total_number)
{

llOwnerSay(llDetectedName(0) +”::”+ (string)llVecMag(llDetectedVel(0)));

string name = llDetectedName(0);
float vel = llVecMag(llDetectedVel(0));

mylist = [name, vel] + mylist;

}

touch_start(integer total_number)
{
llOwnerSay((string) mylist + ” “);
}
}

##############################

And that’s it. Nothing too complicated, stores data of the avatars that collide with it, and then stores them in the list initialised at the beginning of the code.

The list is then recalled in a long string, as formatting in the chat box is not possible (as far as I know.)

Advertisements

Movement

Posted in Uncategorized on October 20, 2010 by veraska

The task was to create an item that would move when you clicked on it, and would loop so that it would move as many times as you would click it.

 

 

 

 

 

 

Idea for Assignment

Posted in Uncategorized on October 20, 2010 by veraska

In this blog post I am going to declare my potential idea for the assignment.

As a base idea, I am intrigued in creating a giant keyboard, a bit like the ones that are in large toy shops in America.

http://createdigitalmusic.com/2005/09/15/the-giant-piano-big-movie-piano-revisited/

The idea is that Avatars will step on the keyboard note, and a sound or at least a written note will show. The extra item would be to create a switch where a pre determined tune will play out in the message box.

 

My next idea is to have a self replicating staircase, where the Avatar steps on the spawn staircase, and a step is created. Subsequent clicks will create more steps until you have a step, and once the Avatar is out of range of earlier steps, they will disappear.

http://2.bp.blogspot.com/_n-baWxEeNIM/Snmyk9V3uXI/AAAAAAAABKY/g8zkspBSnok/s1600-h/floating-staircase.jpg

 

As a finalised idea, I would like to do the stairwell, where stepping on every 5 steps or so plays a note, creating a tune for going up as well as down.

To do this, I believe I will need to implement;

– A Rezzing Stair

– A Sensor on each step to detect a specific Avatar

– A death sequence for the step

– A counter for the note tune

– A Note for instructions

– A Script to play the note

There are several ways around these specifications, but I believe that the overall proposal is sufficient and complex enough to warrant an assignment project.

Wall Shooting

Posted in Uncategorized on October 20, 2010 by veraska

The task was to create a wall that would detect a projectile being shot at it, displaying the speed of the projectile and  the name of the Avatar who shot the projectile at the wall.



Collision and Time

Posted in Uncategorized on October 20, 2010 by veraska

Week 2’s task was to create a prim that would show a text message when an avatar collided with the prim, it would display a message with the name of the avatar, and the speed at which they were travelling.

The other task was to create an object, that when used, would display the time in-game and dictate whether it was morning, afternoon, or night.