Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

SkyDiver Setup

Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
07-21-2004 20:13
CODE

//Creator: Nada Epoch.
//Date : july 21st 2004
//comments: w00t.
//
//
float height = 4000.0;
float zSpeed = 100.0;

default
{
touch_start(integer total_number)
{
if(llGetOwner() != llDetectedKey(0))
{
llWhisper(0,"only my owner can trigger me,");
}
else
{
vector x = llGetPos();
x.z += height;
llTarget(x,200);
}
}

not_at_target()
{
llApplyImpulse(llGetMass()*<0,0,zSpeed>,FALSE); //guess i am not there yet, better push again.
}

at_target(integer index, vector target, vector cPos)
{
llTargetRemove(index);
llMoveToTarget(target,.5); //oo oo i am there, time to slow down!
llSetTimerEvent(0.5);
}

timer()
{
vector vel = llGetVel();
if(vel.z < 20.0)
{
llStopMoveToTarget();
llApplyImpulse(llGetMass()*<0,0,vel.z>,FALSE); //Ah sweet bliss, let the skydiving begin.
}
}
}

edit-script correction
_____________________
i've got nothing. ;)
Lecktor Hannibal
YOUR MOM
Join date: 1 Jul 2004
Posts: 6,734
07-21-2004 21:51
Ahhh Most excellent Nada !!
Thank you I will build something tomorrow and try this out !!
Thanks again,
Lecktor
_____________________
YOUR MOM says, 'Come visit us at SC MKII http://secondcitizen.net '

From: Khamon Fate
Oh, Lecktor, you're terrible.

Bikers have more fun than people !
Slapshot Zamboni
Just A Guy
Join date: 2 Jun 2004
Posts: 9
Question
07-22-2004 09:52
Love the idea but it doesn't recognize me as the owner. After I created the object I even bought it and still no luck.
Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
07-22-2004 10:57
Even though I am owner of the object this is in, it still tells me only its owner can activate it.
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
07-22-2004 16:36
Haha i am so rusty!

llGetKey() should be llDetectedKey(0), I corrected it in the script as well.
_____________________
i've got nothing. ;)
Goshua Lament
Registered User
Join date: 25 Dec 2003
Posts: 703
07-22-2004 16:42
Sorry, what does that script do?
_____________________
Flickr Second Life Photo Gallery

I no longer regularly login to SecondLife, but please contact me if an issue arises that needs my attention.
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
07-22-2004 19:04
it takes you up 4k, and then releases you into free fall. ask Lecktor Hannibal, heh he is the one who brought it up ;)
_____________________
i've got nothing. ;)
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
08-11-2004 11:10
notes on use
I think that i might have forgotten to mention how to use this script. Copy and past it to a new script. stick the script in an object, and then attach the object to your avatar. once the object is attached, then when you touch it, it will trigger the script.
_____________________
i've got nothing. ;)
Lecktor Hannibal
YOUR MOM
Join date: 1 Jul 2004
Posts: 6,734
09-19-2004 21:35
Nada,
I was working with this tonite and noticed a couple of things. As I understand the script (still lowlevel of LSL knowledge yet) it should detach at the target altitude and release the av to freefall? This is neccesary for the parachute script to work properly. Also, when the chute opened, the lifting script retriggered and shot me back up to target forcing me to manually detach the object. ??
_____________________
YOUR MOM says, 'Come visit us at SC MKII http://secondcitizen.net '

From: Khamon Fate
Oh, Lecktor, you're terrible.

Bikers have more fun than people !
Audria Hauptmann
Registered User
Join date: 16 Nov 2005
Posts: 1
04-02-2006 01:23
I would add this:
CODE
  on_rez(integer abc)
{
llResetScript();
}


in there somewhere.. otherwise, script works great ^_^
Andrew Knight
Registered User
Join date: 14 Apr 2006
Posts: 11
04-27-2006 07:46
I've been working on this same script for a while now and came up with some improvements. Feel free to copy and modify as you please. If you like a copy of the object ingame with some basic improvements, feel free to IM me and I'll send you one.

CODE

float height = 100;
float zSpeed = 100.0;
integer channel = 1;
list MENU_MAIN = ["3000", "4000", "Start Jump", "1000", "2000"];

default
{

on_rez(integer param)
{
llSetSitText("Skydive");
llSetTouchText("Menu");
llInstantMessage(llGetOwner(), "Type /42 Help to get the instruction card");
llListen(42, "", NULL_KEY, "");
//llGiveInventory(llGetOwner(), "Instructions");
llSitTarget(<.25, 0, 0.55 >, ZERO_ROTATION);
llListen(channel, "", NULL_KEY, "");
}
touch_start(integer total_number)
{
if(llGetOwner() != llDetectedKey(0))
{
llWhisper(0,"only my owner can trigger me,");
}
else
{
llDialog(llDetectedKey(0), "What do you want to do?", MENU_MAIN, channel);

}
}

listen(integer channel, string name, key id, string message){
if(message == "help" || message == "Help"){
llGiveInventory(llGetOwner(), "Instructions");
}
if(llListFindList(MENU_MAIN, [message]) != -1){
llSay(0, name +" picked the option " +message +".");
if(message == "1000"){
height = 1000;
}else if(message == "2000"){
height = 2000;
}else if(message == "3000"){
height = 3000;
}else if(message == "4000"){
height = 4000;
}else if(message == "Start Jump"){
vector x = llGetPos();
x.z += (height + 300);
llTarget(x, 200);
llSetStatus(STATUS_PHYSICS, TRUE);
}
}
}

not_at_target()
{
llApplyImpulse(llGetMass()*<0,0,zSpeed>,FALSE);
}

at_target(integer index, vector target, vector cPos)
{
llTargetRemove(index);
llMoveToTarget(target,.35);
llSetStatus(STATUS_PHYSICS, FALSE);
llSetTimerEvent(10);


}

timer()
{
llDie();
}
}
Andrew Knight
Registered User
Join date: 14 Apr 2006
Posts: 11
04-27-2006 07:48
I made some modifications to this script to make it a bit more user friendly. feel free to edit it as you see fit. Also, if you'd like a copy of the object ingame, IM me and I'll gladly send you one.


CODE

float height = 100;
float zSpeed = 100.0;
integer channel = 1;
list MENU_MAIN = ["3000", "4000", "Start Jump", "1000", "2000"];

default
{

on_rez(integer param)
{
llSetSitText("Skydive");
llSetTouchText("Menu");
llInstantMessage(llGetOwner(), "Type /42 Help to get the instruction card");
llListen(42, "", NULL_KEY, "");
//llGiveInventory(llGetOwner(), "Instructions");
llSitTarget(<.25, 0, 0.55 >, ZERO_ROTATION);
llListen(channel, "", NULL_KEY, "");
}
touch_start(integer total_number)
{
if(llGetOwner() != llDetectedKey(0))
{
llWhisper(0,"only my owner can trigger me,");
}
else
{
llDialog(llDetectedKey(0), "What do you want to do?", MENU_MAIN, channel);

}
}

listen(integer channel, string name, key id, string message){
if(message == "help" || message == "Help"){
llGiveInventory(llGetOwner(), "Instructions");
}
if(llListFindList(MENU_MAIN, [message]) != -1){
llSay(0, name +" picked the option " +message +".");
if(message == "1000"){
height = 1000;
}else if(message == "2000"){
height = 2000;
}else if(message == "3000"){
height = 3000;
}else if(message == "4000"){
height = 4000;
}else if(message == "Start Jump"){
vector x = llGetPos();
x.z += (height + 300);
llTarget(x, 200);
llSetStatus(STATUS_PHYSICS, TRUE);
}
}
}

not_at_target()
{
llApplyImpulse(llGetMass()*<0,0,zSpeed>,FALSE);
}

at_target(integer index, vector target, vector cPos)
{
llTargetRemove(index);
llMoveToTarget(target,.35);
llSetStatus(STATUS_PHYSICS, FALSE);
llSetTimerEvent(10);


}

timer()
{
llDie();
}
}
MadameThespian Underhill
"I'm Aaacting!"
Join date: 18 Dec 2002
Posts: 38
04-29-2006 14:05
Okay so this doesn't work for me. I've copied the script into a box, attached the box, clicked it, got the menu (on Andrew's version,) clicked "4000" and I didn't move. What am I doing wrong? :(

btw, I tried both -- Nada's and now Andrew's -- and got no results.
_____________________
Support the arts...go to the theatre!
MadameThespian Underhill
"I'm Aaacting!"
Join date: 18 Dec 2002
Posts: 38
04-29-2006 14:35
I tried both scripts and didn't get any response...except a popup menu from Andrew's script that when I choose a height, i.e. 4,000, nothing happened. What am I doing wrong? :(
_____________________
Support the arts...go to the theatre!
Dr Drebin
Registered User
Join date: 19 Mar 2006
Posts: 66
08-31-2006 04:27
From: Andrew Knight
I've been working on this same script for a while now and came up with some improvements. Feel free to copy and modify as you please. If you like a copy of the object ingame with some basic improvements, feel free to IM me and I'll send you one.


Do I drop the script in an object and:

Sit on it;
Wear it; or
Attach it to another object and sit on that object?

The menu choices work fine. But I don't go anywhere.

With the original, I have to attach it to myself (wear) for it to take me up. (But at least I go up.... )