Push All Scripts
This commit is contained in:
6
JetPack/JetPack/JetPack.prj
Normal file
6
JetPack/JetPack/JetPack.prj
Normal file
@@ -0,0 +1,6 @@
|
||||
<Project name="JetPack" guid="D651BE7C-6C00-1014-B904-200204C60A89">
|
||||
<Object name="Object" guid="D651BF6D-6C00-1014-B904-200204C60A89">
|
||||
<Script name="JetPack_1.lsl" guid="D655FF26-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
121
JetPack/JetPack/Object/JetPack_1.lsl
Normal file
121
JetPack/JetPack/Object/JetPack_1.lsl
Normal file
@@ -0,0 +1,121 @@
|
||||
// :CATEGORY:Vehicles
|
||||
// :NAME:JetPack
|
||||
// :AUTHOR:Encog Dod
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:38:55
|
||||
// :ID:410
|
||||
// :NUM:566
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// JetPack
|
||||
// :CODE:
|
||||
// From the book:
|
||||
//
|
||||
// Scripting Recipes for Second Life
|
||||
// by Jeff Heaton (Encog Dod in SL)
|
||||
// ISBN: 160439000X
|
||||
// Copyright 2007 by Heaton Research, Inc.
|
||||
//
|
||||
// This script may be freely copied and modified so long as this header
|
||||
// remains unmodified.
|
||||
//
|
||||
// For more information about this book visit the following web site:
|
||||
//
|
||||
// http://www.heatonresearch.com/articles/series/22/
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llReleaseControls();
|
||||
}
|
||||
|
||||
attach(key id)
|
||||
{
|
||||
if(id)
|
||||
{
|
||||
state attached;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
state attached
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llSetTimerEvent(1);
|
||||
}
|
||||
|
||||
attach(key id)
|
||||
{
|
||||
if(id==NULL_KEY)
|
||||
{
|
||||
state default;
|
||||
}
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
if (llGetAgentInfo(llGetOwner()) & AGENT_FLYING)
|
||||
{
|
||||
state flying;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
state flying
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS);
|
||||
llSetTimerEvent(1);
|
||||
}
|
||||
|
||||
run_time_permissions(integer perm)
|
||||
{
|
||||
if (perm & PERMISSION_TAKE_CONTROLS) {
|
||||
llTakeControls(CONTROL_UP|CONTROL_FWD|CONTROL_BACK, TRUE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
attach(key id)
|
||||
{
|
||||
if(id==NULL_KEY)
|
||||
{
|
||||
state default;
|
||||
}
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
vector pos = llGetPos();
|
||||
llSetText("Altitude: " + (string)pos.z, <0,1,0>, 1 );
|
||||
|
||||
if (!(llGetAgentInfo(llGetOwner()) & AGENT_FLYING) )
|
||||
{
|
||||
llReleaseControls();
|
||||
state attached;
|
||||
}
|
||||
}
|
||||
|
||||
control(key id, integer held, integer change)
|
||||
{
|
||||
if (held & CONTROL_UP)
|
||||
{
|
||||
llPushObject(llGetOwner(), <0,0,2>, ZERO_VECTOR, FALSE);
|
||||
}
|
||||
else if (held & CONTROL_FWD)
|
||||
{
|
||||
rotation rot = llGetRot();
|
||||
vector vel = llRot2Fwd(rot);
|
||||
|
||||
if( llGetAgentInfo(llGetOwner()) & AGENT_FLYING )
|
||||
vel*=4;
|
||||
else
|
||||
vel/=2;
|
||||
|
||||
llPushObject(llGetOwner(), vel, ZERO_VECTOR, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
7
JetPack/JetPack/Object/_vti_cnf/JetPack_1.lsl
Normal file
7
JetPack/JetPack/Object/_vti_cnf/JetPack_1.lsl
Normal file
@@ -0,0 +1,7 @@
|
||||
vti_encoding:SR|utf8-nl
|
||||
vti_timelastmodified:TR|08 Sep 2013 03:49:02 -0000
|
||||
vti_extenderversion:SR|12.0.0.6211
|
||||
vti_backlinkinfo:VX|
|
||||
vti_author:SR|alien\\fred
|
||||
vti_modifiedby:SR|alien\\fred
|
||||
vti_timecreated:TR|18 Sep 2013 20:38:55 -0000
|
||||
6
JetPack/JetPack/_vti_cnf/JetPack.prj
Normal file
6
JetPack/JetPack/_vti_cnf/JetPack.prj
Normal file
@@ -0,0 +1,6 @@
|
||||
vti_encoding:SR|utf8-nl
|
||||
vti_timelastmodified:TR|17 Aug 2013 23:32:24 -0000
|
||||
vti_extenderversion:SR|12.0.0.0
|
||||
vti_cacheddtm:TX|17 Aug 2013 23:32:24 -0000
|
||||
vti_filesize:IR|253
|
||||
vti_backlinkinfo:VX|
|
||||
Reference in New Issue
Block a user