Default Example

Expired

// Bromley College
// Linden Script Exhibition
 
// Code for poster 4;
 
// Comments, which can span multiple lines, begin with two forward slashes and end with a semicolon;
 
default
{
    state_entry()
    {
        llSay(0, "Compile Successful!");
    }
 
    touch_start(integer total_number)
    {
        llSay(0, "Sign Touched.");
    }
}
 
// End of code;
 
// If you choose "Keep" a copy of this card will be added to your Notecards folder.
 
// For more information please contact Clive Pro in world.

 

For Example

Expired

// Bromley College
// Linden Script Exhibition
 
// Code for poster 17;
 
default
{
    state_entry()
    {
        llSay(0, "Compile Successful!");
    }
 
    touch_start(integer total_number)
    {
        integer  j;
        integer  count = 3;
        for (j = 0; j 

 

Show Position

Expired

// Bromley College
// Linden Script Exhibition
 
// Code for Step 22 Poster
 
default
{
    touch_start(integer total_number)
    {
        // get current position
        vector Pos = llGetPos();
        // display position
        llSay ( 0, "Current postion vector is " + (string)Pos + " metres");
    }
}
 
// End of code;

 

Elevator

Expired

key owner;
default
{
    state_entry()
    {
        owner=llGetOwner();
        llListen(0,"",owner,"");
        llListen(34,"","","first");
        llListen(34,"","","second");
        llSetStatus(STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z,FALSE);
    }
 
    listen(integer a, string n, key id, string m)
    {
        // When the object hears align, it will grab the base position, and after which, all moves will be made by adjusting the z-coordinate of the base position.
        if(m=="align")
        {
            pos=llGetPos();
            llSetStatus(STATUS_PHYSICS,TRUE);
            llMoveToTarget(pos,1.5);
        } 
 
        //  For the first floor, we want the elevator to be at its base position, so end(final resting place of the elevator) is the same as pos.  I showed the addition of the vector <0,0,0> merely for continuity.  The same comments about tau that apply to the llSetHoverHeight, apply to llMoveTarget.
        if(m=="first")
        {
            end=pos;
            llMoveToTarget(end,1.5);
        }
 
        if(m=="second")
        {
            end=pos+<0,0,3.29>;
            llMoveToTarget(end,1.5);
        }
 
    }
}