Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

(Library:) High Altitude Rezzer

Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
09-15-2007 07:40
There has been an interest shown in the forums lately about creating/rezzing objects at altitudes of over 768 meters. This script allows you to rez an object at elevations up to 4,096 meters.


CODE

//High Altitude Rezzer
//Creator: Jesse Barnett
//This script has been released to the script library in both wikis and the forums. Please do not sale this script! Be nice!
//Create something pretty to put this script in and to sit on. Place the script inside along with the object which you wish to rez.
//Sit on your beautiful creation and then touch it to ascend to the height you set below where it will rez your object. Stand up
//walk around, enjoy. When you want to return to where you started then just sit on it, delete your rezzed object and touch again.

integer target_height = 4090;//Set the elevation you want to go to here. Maximum you can rez objects is 4096.
float zSpeed = 500.0;
vector x;
vector w;
list grnd;
vector ground;
vector rez_obj_offset = <0.0, 0.0, -0.5>;//Adjust this as necessary for postion of
//rezzed object in relation to vehicle. (no more then 10.0 in any axis)

default{
on_rez(integer start_param) {
llResetScript();
}
state_entry(){
grnd = [];
grnd += llGetPos();
ground = llList2Vector(grnd, 0);
vector pos = llGetPos();
llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE);
if(pos.z >= (target_height - 5)){
state descend;
}
llSetText("Sit and touch to ascend", <0,0,0>,1.0);
}
touch_start(integer total_number){
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);
llRezObject(llGetInventoryName(INVENTORY_OBJECT, 0), llGetPos() + rez_obj_offset, ZERO_VECTOR, ZERO_ROTATION, 42);
state descend;
}
}
}
state descend{
state_entry() {
vector pos = llGetPos();
llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE);
if(pos.z <= (ground.z + 5)){
state default;
}
llSetText("Sit and touch to descend", <0,0,0>,1.0);
}
touch_start(integer total_number){
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);
state default;

}
}
}
_____________________
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
09-15-2007 07:49
I posted it to the library but figure Nada is more then kind of busy doing her spring cleaning there. Hopefully she will be able to link it back from here.

Hey Nada, could this maybe be an idea for you? Would it work if we would put (Library) in the header and every now and then you could do a search through scripting tips for it? Maybe a dumb idea? Just trying to help and also wanted to state that you are doing an awesome job!!!!!! Just wish there was a way to allow EVERYONE at least read access to this library and preferably scripting tips too. It is such a shame that so much valuable information here in the content creation forums is not accessable to the majority of Second Life users.

Now I have a problem. I stated in the script that I was going to post it to both of the wikis. Unfortunately I found out quickly that I am both Mediawiki and wakkawiki illiterate. I do not know when I will have the time to learn how to create a page in both and I would appreciate if someone could post them there for me? Please, pretty please????
_____________________
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
Gaynor Gritzi
Registered User
Join date: 16 Aug 2006
Posts: 48
09-21-2007 07:16
There's a simpler way to rez objects at high altitudes - assuming you have a flight control attachment that lets you fly up above 740m.

Wear the object/platform/building that you want to rez as an attachment, fly up to the altitude you want and drop the attachment.

You'll end up with an object/platform/building that is stable but immovable (though still editable for some functions), but you can then rez other objects on top of it - though bear in mind that everything at that altitude will be immovable.
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
09-21-2007 07:33
From: Jesse Barnett
Just wish there was a way to allow EVERYONE at least read access to this library and preferably scripting tips too. It is such a shame that so much valuable information here in the content creation forums is not accessable to the majority of Second Life users.



Curious as this is the first time I've heard this...why would the forums be inaccessible to the majority of SL users? I'm guessing I must've missed something at some point. Here I always just thought that they chose not to come here like in most games.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
09-21-2007 09:53
From: Tiarnalalon Sismondi
Curious as this is the first time I've heard this...why would the forums be inaccessible to the majority of SL users? I'm guessing I must've missed something at some point. Here I always just thought that they chose not to come here like in most games.

The forums have always been closed to everyone without payment info on file. Which would be understandable to keep flame wars down etc. But they don't even allow read only access unless you have the payment info.
_____________________
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
09-21-2007 09:59
From: Gaynor Gritzi
There's a simpler way to rez objects at high altitudes - assuming you have a flight control attachment that lets you fly up above 740m.

Wear the object/platform/building that you want to rez as an attachment, fly up to the altitude you want and drop the attachment.

You'll end up with an object/platform/building that is stable but immovable (though still editable for some functions), but you can then rez other objects on top of it - though bear in mind that everything at that altitude will be immovable.

Yep. I have my scripting platform/garden tied into my flight assist so that I can rez a workspace where ever I am at. This script I used as an experiment when I was making my own flight assist/TP/radar/rez/set elevation hud. This is a nice barebones one so people can see how it was scripted and add on to it. Nice to use in a sandbox to get above the majority of greifers. Can't really build up there but perfect for us scripters.
_____________________
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
Dire Graves
Registered User
Join date: 3 Sep 2007
Posts: 51
09-21-2007 13:23
Hey this script looks familiar ;-)

Thanks again for sharing it Jesse!