Flight Script - Final Flight 2.2

Thread Started By machinecode

2607
0
  • 66 Vote(s) - 3.15 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
Put in a prim and wear.

[To see links please register here]


PHP Code:
//Final Flight 2.2
 
float speed=10000;
 
default
{
    
attach(key on)
    {
        if (
on != NULL_KEY)
        {
            
llListen(0,"",llGetOwner(),"");
            
integer perm llGetPermissions();
            if (
perm != (PERMISSION_TAKE_CONTROLS))
            {
                
llRequestPermissions(onPERMISSION_TAKE_CONTROLS);
            }
            else
            {
                
llTakeControls(CONTROL_FWD TRUETRUE);
            }
        }
    }
 
    
listen(integer channelstring namekey idstring m)
    {
        list 
test llCSV2List(m);
        if(
llGetListLength(test)==2&&llList2String(test,0)=="speed")
            
speed=llList2Float(test,1);
    }
 
    
run_time_permissions(integer perm)
    {
        if (
perm)
        {
            
llTakeControls(CONTROL_FWDTRUETRUE);
        }
    }
 
    
control(key ownerinteger levelinteger edge)
    {
        if (!(
level CONTROL_FWD) || !(llGetAgentInfo(llGetOwner())&AGENT_FLYING))
        {
            
llSetForce(<0,0,0>, FALSE);
        }
        else
        {
            
vector fwdllRot2Fwd(llGetRot());
            
fwd llVecNorm(fwd);
            
fwd *= speed;
            
llSetForce(fwdFALSE);
        }
    }
 

Reply




Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...