A sky diving transport
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-13-2006 12:32
In celebration of my 300th post here in the forums i'll donate this script. Have seen a couple of scripts around and none did what I really wanted. Just pop this in a prim or object linkset and put how high you want to go in the object description field. Sit on the object and touch to go!!!! When it reaches the destination height it will wait for 60 seconds before returning to the spot it was rezzed at. //Sky Diving Transport V 1.0 //Created by; Jesse Barnett //Some parts based on a script by Nada Epoch //date of last edit: 11/12/06 //Put the target height in the Object Description field. Example ; "4000" (without quatation marks) //The maximum ceiling for a physical vehicle is 4096 integer target_height; float zSpeed = 500.0; vector x; vector w; vector ground;
default{ on_rez(integer start_param) { llResetScript(); } state_entry(){ ground = llGetPos(); target_height = (integer)llGetObjectDesc(); llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE); llSetText("Sit and touch to ascend to " + (string)target_height + " meters", <0,0,0>,1.0); } touch_start(integer total_number){ integer test = (integer)llGetObjectDesc(); if(target_height != test) { llOwnerSay("Script reset. Please touch again to go"); llResetScript(); } llSetStatus(STATUS_PHYSICS, TRUE); x = llGetPos(); x.z = target_height; llTarget(x,50); }
not_at_target(){ llApplyImpulse(llGetMass()*<0,0,zSpeed>,FALSE); }
at_target(integer ascend, vector target, vector cPos){ llTargetRemove(ascend); llMoveToTarget(target, 1); llSetTimerEvent(5.0); }
timer(){ vector pos = llGetPos(); if(pos.z >= (target_height - 1)){ llStopMoveToTarget(); llApplyImpulse(-llGetMass()*llGetVel(),FALSE); llSetStatus(STATUS_PHYSICS, FALSE); llSay(0, "At target height, I will return to earth in 60 seconds"); llSetText("",<0,0,0>, 0); llSleep(60); state descend; } } } state descend{ state_entry() { llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE); llSetStatus(STATUS_PHYSICS, TRUE); w = llGetPos(); w.z = ground.z; llTarget(w,50); }
not_at_target(){ llApplyImpulse(llGetMass()*<0,0,-500>,FALSE); }
at_target(integer descend, vector target2, vector Pos){ llTargetRemove(descend); llMoveToTarget(target2,1); llSetTimerEvent(5.0); } timer(){ vector pos = llGetPos(); if(pos.z <= (ground.z + 1)){ llStopMoveToTarget(); llApplyImpulse(-llGetMass()*llGetVel(),FALSE); llSetStatus(STATUS_PHYSICS, FALSE); llSetPos(ground); llSay(0, "At Destination"); state default; } } }
If there are no suggestions to be incorporated into it I will put it in the Library. Happy skydiving!!!!
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
Thanto Usitnov
Lord Byron wannabe
Join date: 4 Aug 2006
Posts: 68
|
11-13-2006 13:20
Is there some special reason you're using a physical vehicle and applying force to it instead of using a non-physical vehicle and using WarpPos?
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-13-2006 13:34
You cant go up to 4000+ meters using warpPos that I know of. Plus it is pretty cool going along for the ride.
Oooops. FOrgot one other reason. Many people enjy skydiving with thier freinds. By using a physical vehicle that goes up and then waits, everyone can jump off together.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
11-13-2006 14:43
Hi, Jesse! Why wait 60 seconds? Why not wait until the sitter stands? In case some kind of crash knocks the sitter off the object without an unsit event, a repeating timer to check for a missing sitter could be implimented, which is turned off when the prim returns, regardless of why it returns.
_____________________
- ninjafoo Ng Says:
November 4th, 2006 at 7:27 am We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-13-2006 14:53
ah I actually have a different version that I use for another purpose. In that version the descend state is touch activated but a sensor sweeps once per minute to see if anyone is around. No one there and it will descend.
Basically I wanted to keep this version simple to understand for the library.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
11-13-2006 14:59
Hokay.
"I`m sorry." ::giggle::
_____________________
- ninjafoo Ng Says:
November 4th, 2006 at 7:27 am We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-13-2006 15:05
Well I'm sorry that your sorry.
Ugh oh......must stop myself before it gets out of hand................... LMAO
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
11-13-2006 15:15
_____________________
- ninjafoo Ng Says:
November 4th, 2006 at 7:27 am We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
11-13-2006 15:57
I'm jsut sorry I was too late to post a witty comment
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
11-13-2006 16:23
At least this time we`re not taking over someone else`s thread for our Mutual Apology Society. ::hugs::
_____________________
- ninjafoo Ng Says:
November 4th, 2006 at 7:27 am We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?
|
Thanto Usitnov
Lord Byron wannabe
Join date: 4 Aug 2006
Posts: 68
|
11-13-2006 17:56
Come to think of it, I recently tested a non-phys vehicle script, and yeah, it only goes up to something like 760m (probably 76  . That doesn't make any sense, though. Why would physical things be able to go up to 4096m, but non-physical can't? This sounds like a bug to me.
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
11-13-2006 18:07
Not really a bug, so much as a policy. I`m not certain what the exact number is, but this is the build ceiling. You cannot fly higher than this with non-physical flight scripts, becuase non-physical flight scripts use the building functions.
Now, if you were to create a building below this limit, and use physics to move it above the limit, then set it non-physical again, anyone know what would happen?
_____________________
- ninjafoo Ng Says:
November 4th, 2006 at 7:27 am We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
11-14-2006 15:50
From: Llauren Mandelbrot Not really a bug, so much as a policy. I`m not certain what the exact number is, but this is the build ceiling. You cannot fly higher than this with non-physical flight scripts, becuase non-physical flight scripts use the building functions.
Now, if you were to create a building below this limit, and use physics to move it above the limit, then set it non-physical again, anyone know what would happen?
No idea, but tell me where and when and I'll bring the beer and peanuts and watch from the next sim over.
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-14-2006 16:02
Actually I did that a few months ago. I put a balloon script into an airplane and it did work. But I flew past the 4096 ceiling and the house literally blew up. Several months later and I still get a piece sent back every now and then. You can turn it back to non physical and it will stay there. But the easiest thing is just to use the coalesce trick. Select the whole house, even unlinked and take into inventory. You end up with one object. You can then rezz that at any height up to 4096 (as long as you are within 10 meters of rezzer).
I'll look for you next time I am online and show you a trick along those lines Llauren.
What kind of beer Newgate??? I'm picky!
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
11-15-2006 02:16
The numbers are, as speculated above, 768m and 4096m.
Orbiters get you higher (and crash you) because they push so damn hard you cross the 4096m barrier and they calculate your next position at xmillion metres. Because this is above the limit there are issues, hence the need to relog.
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
11-15-2006 10:47
Eloise, I`m confused. I`ve been higher than 4096 meters, with a flight-assist script. Far higher.Actually I did that a few months ago. [....] Several months later and I still get a piece sent back every now and then. From: Jesse Barnett You can turn it back to non physical and it will stay there. Hokay, thanks. Pretty much what I expected.But the easiest thing is just to use the coalesce trick. Select the whole house, even unlinked and take into inventory. You end up with one object.Mmmhmm. Familiar with that. It`s great when I do it deliberately, and horrid when autoreturn does it for me.You can then rezz that at any height up to 4096 (as long as you are within 10 meters of rezzer).I can rez stuff at any altitude [that allows stuff to be rezed] without a pre-existing base at that altitude to rez stuff on, becuase I have a tool that allows me to rez such a base wherever I am [provided that running scripts and building are both possible]. This does not sound to me like what you are talking about. Please amplify.I'll look for you next time I am online and show you a trick along those lines Llauren.Sounds interesting. I`ll look for you when I have time. What kind of beer Newgate??? I'm picky!Personally, I prefer root.
_____________________
- ninjafoo Ng Says:
November 4th, 2006 at 7:27 am We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-15-2006 11:17
From: Llauren Mandelbrot Eloise, I`m confused. I`ve been higher than 4096 meters, with a flight-assist script. Far higher Take a look at the Flight Assist script in the library. You will see that although it takes controls like a vehicle does and uses a target, it never turns itself "physical". It uses llPushObject to move and llSetBouyancy to hover. So it is not limited to the same restraints as a physical object. That flight assist script is the one I use and I have flown up to 100,000 meters. You can fly much higher with that one but who wants to hold down the page up button that long. Using MultiGadget, I have flown over 10,000,000 meters. But at that height you loose connection to the server(don't know why height would affect it) and you turn into a streaky blob. You will revert to your former shape when you come down but still need to reboot for all attachments etc to return to normal PS Root beer is nice but what cheese goes with it???
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-15-2006 11:27
Disregard previous message. Actually at the same time as this is being discussed I have been creating a script based on this design. You can wear it and tell it your target height and it will bring you there +/- 1 meter. Both the transport script and my new one uses llSetStatus(STATUS_PHYSICS, TRUE) BUT>>>>> The sit on transport is limited to the 4096 ceiling and my attached one I just checked and it brought me to 10,000 meters. So it isn't the fact that an object is physical that limits it. It is whether it is attached or not.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-15-2006 11:40
Sometimes it is frustrating to move to an exact height when working far off the ground. This is not a flight assist script. It only moves you up and down but does so accurately and to an ?unlimited? height. Fun to play with; //<enter name here> Have no idea what it is, just know it is useful //Created by Jesse Barnett //11/15/2006 //Based on Nada Epoch's Sky Diver Setup Script //Accurately set your height from 2 meters above ground to 10,000??? meters within +/- 1 meter (tested to 50,000 meters) //Turn off any other flight assist while using
//You should change to a channel of your choice //create a small prim and put in script //wear the object (I attached mine to my spine) //type "/99 1000" for example to go to fly up to 1000 meters //if you type /99 0" it will bring you back to ground level //You can still enter into "fly" mode to keep your arms from flailing //type "/99" off to reset //helpful tip; once a channel has been declared by typing "/99" for example //you just need to type // after that to say on the same channel
float target_height; float zSpeed = 500; float ground; vector x; integer chan = 99;//Change channel here
default{ state_entry(){ llSetAlpha(0.0, ALL_SIDES); llListen( chan, "", llGetOwner(), "" ); }
listen(integer channel, string name, key id, string message){ if( message == "off"){ llResetScript(); } else{ target_height = (float)message; } x = llGetPos(); llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE); llSetStatus(STATUS_PHYSICS, TRUE); ground = llGround(ZERO_VECTOR); if(target_height < ground){ target_height = ground; } if(target_height > x.z){ zSpeed = 500.0; } else if(target_height <= x.z){ zSpeed = -500.0; } x.z = target_height; llTarget(x,50); }
not_at_target(){ llApplyImpulse(llGetMass()*<0,0,zSpeed>,FALSE); }
at_target(integer move, vector target, vector cPos){ llTargetRemove(move); llMoveToTarget(target, 1); llSetTimerEvent(5.0); }
timer(){ vector pos = llGetPos(); vector vel = llGetVel(); if(vel.z < 20.0){ llStopMoveToTarget(); llApplyImpulse(-llGetMass()*llGetVel(),FALSE); pos = llGetPos(); if(pos.z > ground + 2){ llSetBuoyancy(1.0); } else{ llSetStatus(STATUS_PHYSICS, FALSE); llResetScript(); } } } }
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
Thanto Usitnov
Lord Byron wannabe
Join date: 4 Aug 2006
Posts: 68
|
11-15-2006 17:05
From: Jesse Barnett Take a look at the Flight Assist script in the library. You will see that although it takes controls like a vehicle does and uses a target, it never turns itself "physical". It uses llPushObject to move and llSetBouyancy to hover. llPushObject and llSetBuoyancy (this is the correct spelling, in case you want to look it up in the wiki) are only supposed to work on physical objects. In fact, the wiki entry for llSetBuoyancy says that it " ets a physical object's buoyancy"--nothing about non-physical objects at all. Additionally, all of these require energy expenditure. I don't see how that could apply to non-physical objects, which aren't supposed to have energy (or mass!). So how are these supposed to work on non-physical objects?
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-15-2006 17:10
From: Thanto Usitnov llPushObject and llSetBuoyancy (this is the correct spelling, in case you want to look it up in the wiki) are only supposed to work on physical objects. In fact, the wiki entry for llSetBuoyancy says that it "ets a physical object's buoyancy"--nothing about non-physical objects at all. Additionally, all of these require energy expenditure. I don't see how that could apply to non-physical objects, which aren't supposed to have energy (or mass!). So how are these supposed to work on non-physical objects? I have been using it without looking at it till now. I was going to play some more tonight. Looks like wiki needs an update. Here is the script and you can try it: /15/4e/134594/1.html
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
11-15-2006 17:16
I have a script with a similar function, written by a friend of mine who taught a class I happen to have attended. My copy is in an innertube, of all things, which of course one sits on. I wonder what would happen if I were to wear it instead. As for my flight assist device, I`m not sure what script it uses. The device was custom-made by another friend, and I don`t recall what script she used. I don`t know what cheeses go well with root beer, either.
_____________________
- ninjafoo Ng Says:
November 4th, 2006 at 7:27 am We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
11-15-2006 17:20
I just remembered that the innertube script would refuse to go higher, because it is written to refuse. What I don`t know is how high it could be made to go without that limit, though I suspect that it would still top out at the building limit anyway.
_____________________
- ninjafoo Ng Says:
November 4th, 2006 at 7:27 am We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-15-2006 18:06
Thanto I just checked. You do not need to enable physics or make an object physical to uses physics in an attachment. I changed my script above to add some more features and took out the phsyical set status commands and it works fine. You can try this one too if you want: //<enter name here>V2.0 Have no idea what it is, just know it is useful //Created by Jesse Barnett //11/15/2006 //Based on Nada Epoch's Sky Diver Setup Script //Accurately set your height from 2 meters above ground to 10,000??? meters within +/- 1 meter (tested to 100,000 meters) //Turn off any other flight assist while using
//You should change to a channel of your choice //create a small prim and put in script //attach to your HUD //Touch the prim to turn it on ///type "/99 off" or land on ground to turn it off //type "/99 1000" for example to fly up to 1000 meters //you can keep entering different elevations to go up and down until you turn it off or land on the ground //if you type /99 0" it will bring you back to ground level //You can still enter into "fly" mode to keep your arms from flailing //helpful tip; once a channel has been declared by typing "/99" for example //you just need to type // after that to say on the same channel
float target_height; float zSpeed; float ground; vector x; integer chan = 99;//Change channel here
default{ state_entry(){ llSetAlpha(0.4, ALL_SIDES); } touch_start(integer num_detected) { llSetAlpha(0.8, ALL_SIDES); llListen( chan, "", llGetOwner(), "" ); }
listen(integer channel, string name, key id, string message){ if( message == "off"){ llResetScript(); } else{ target_height = (float)message; } x = llGetPos(); ground = llGround(ZERO_VECTOR); if(target_height < ground){ target_height = ground; } if(target_height > x.z){ zSpeed = 500; } else if(target_height <= x.z){ zSpeed = -500; } x.z = target_height; llTarget(x,50); }
not_at_target(){ llApplyImpulse(llGetMass()*<0,0,zSpeed>,FALSE); }
at_target(integer move, vector target, vector cPos){ llTargetRemove(move); llMoveToTarget(target, 1); llSetTimerEvent(5.0); }
timer(){ vector vel = llGetVel(); vector pos = llGetPos(); if(vel.z < 20.0){ llStopMoveToTarget(); llApplyImpulse(-llGetMass()*llGetVel(),FALSE); if(pos.z > ground + 2){ llSetBuoyancy(1.0); } else{ llResetScript(); } } } }
But actually this opens up a whole can of worms that I am not prepared to tackle. It would require making notes in each of the physics related pages in the wiki. Plus just realised one more discrepancy :"An attachment is any object that is nonphysical and has been attached". But you CAN attach an object and then make it physical per the first version of this script above.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
Thanto Usitnov
Lord Byron wannabe
Join date: 4 Aug 2006
Posts: 68
|
11-15-2006 20:22
So does it only work for attachments, or can it work for objects one is sitting on? If the former, I already knew this--attachments do not affect an avatar's physicality, and because an attachment is necessarily attached to a physical object, it is effectively physical by attachment, so whether or not it's been set to physical doesn't matter--it becomes physical. If it's the latter, on the other hand, that would be something interesting.
|