This commit is contained in:
Fred Beckhusen
2015-08-07 15:34:30 -05:00
parent ce47ec2f3e
commit fde850293c
8080 changed files with 0 additions and 2443112 deletions

View File

@@ -1,3 +0,0 @@
<Solution name="ParachuteHUD">
<Project name="ParachuteHUD" path="ParachuteHUD\ParachuteHUD.prj" active="true"/>
</Solution>

View File

@@ -1,161 +0,0 @@
// :CATEGORY:Parachute
// :NAME:ParachuteHUD
// :AUTHOR:Encog Dod
// :CREATED:2010-01-10 05:20:56.000
// :EDITED:2013-09-18 15:38:59
// :ID:606
// :NUM:830
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// ParachuteHUD
// :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/
integer CHANNEL = 155;
displayChute(float alpha)
{
llSetLinkPrimitiveParams(2,[PRIM_COLOR, ALL_SIDES,<1,1,1>, alpha ]);
llSetLinkPrimitiveParams(3,[PRIM_COLOR, ALL_SIDES,<1,1,1>, alpha ]);
llSetLinkPrimitiveParams(4,[PRIM_COLOR, ALL_SIDES,<1,1,1>, alpha ]);
llSetLinkPrimitiveParams(5,[PRIM_COLOR, ALL_SIDES,<1,1,1>, alpha ]);
llSetLinkPrimitiveParams(6,[PRIM_COLOR, ALL_SIDES,<1,1,1>, alpha ]);
}
integer calculateGroundDistance()
{
vector pos = llGetPos();
float ground = llGround(pos);
float distance = llRound(pos.z-ground);
return (integer)distance;
}
displayGroundDistance()
{
llSetText("Distance to Ground: " + (string)calculateGroundDistance(),<0,1,0>,1);
}
default
{
attach(key id)
{
if(id)
{
state attached;
}
}
}
state attached
{
state_entry()
{
displayChute(0);
llSetTimerEvent(1);
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
llPreloadSound( "parachute" );
llListen( CHANNEL, "", NULL_KEY, "" );
}
attach(key id)
{
if(id==NULL_KEY)
{
state default;
}
}
listen(integer channel, string name, key id, string message)
{
llSay(0,message);
if( message=="open" )
state deployed;
}
timer()
{
displayGroundDistance();
}
}
state falling
{
state_entry()
{
llSetTimerEvent(1);
llListen( CHANNEL, "", NULL_KEY, "" );
}
timer()
{
integer dist = calculateGroundDistance();
displayGroundDistance();
}
attach(key id)
{
if(id==NULL_KEY)
{
state default;
}
}
}
state deployed
{
state_entry()
{
llTriggerSound("parachute",1);
displayChute(1);
llSetTimerEvent(0.1);
llStopAnimation("falldown");
llStartAnimation("hover");
llListen( CHANNEL, "", NULL_KEY, "" );
}
listen(integer channel, string name, key id, string message)
{
if( message=="close" )
state attached;
}
timer()
{
vector v = llGetVel();
if( v.z < -7 )
{
llPushObject(llGetOwner(), <0,0,7>, ZERO_VECTOR, FALSE);
}
displayGroundDistance();
}
attach(key id)
{
if(id==NULL_KEY)
{
llStopAnimation("hover");
state default;
}
}
}

View File

@@ -1,7 +0,0 @@
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|08 Sep 2013 03:49:04 -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:59 -0000

View File

@@ -1,6 +0,0 @@
<Project name="ParachuteHUD" guid="D67D761C-6C00-1014-B904-200204C60A89">
<Object name="Object" guid="D67D770E-6C00-1014-B904-200204C60A89">
<Script name="ParachuteHUD_1.lsl" guid="D680FDC2-6C00-1014-B904-200204C60A89">
</Script>
</Object>
</Project>

View File

@@ -1,6 +0,0 @@
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|17 Aug 2013 23:32:25 -0000
vti_extenderversion:SR|12.0.0.0
vti_cacheddtm:TX|17 Aug 2013 23:32:25 -0000
vti_filesize:IR|263
vti_backlinkinfo:VX|

View File

@@ -1,6 +0,0 @@
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|17 Aug 2013 23:32:25 -0000
vti_extenderversion:SR|12.0.0.0
vti_cacheddtm:TX|17 Aug 2013 23:32:25 -0000
vti_filesize:IR|128
vti_backlinkinfo:VX|