Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

for alien queen

sirhc DeSantis
Registered User
Join date: 8 Jan 2007
Posts: 60
03-30-2007 20:23
CODE
// basic piston
// +/- 1 metre in cm steps
// assumes z axis only
//
// change for steps for shorter transition
// change llSetPos increment to make bigger steps
// can add touch on/off as required
// open source - have fun ! sirhcdesantis

// vars

vector where_we_are;
integer t;
integer running; // otherwise we run once

default
{
state_entry()
{
running = 1; // this forces it to run all the time
// loop starts here
while( running == 1 )
{
// lets go up
for( t = 0 ; t < 99 ; t ++ ) // 100 step counter
{
where_we_are = llGetPos(); // where we are (we might have moved)
llSetPos( <where_we_are.x, where_we_are.y, where_we_are.z + 0.01> ); // adds 1 cm to our z axis location
}
// and lets go down
for( t = 0 ; t < 99 ; t ++ )
{
where_we_are = llGetPos();
llSetPos( <where_we_are.x, where_we_are.y, where_we_are.z - 0.01> );
}
}
}
}
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Discussion Thread
04-09-2007 04:57
/54/7e/176341/1.html
_____________________
i've got nothing. ;)