Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

altitude set script

Bilbo Goodliffe
all around good guy
Join date: 30 Dec 2005
Posts: 22
01-18-2007 00:33
I can not figure out what is said to set the altitude

//this script accepts input from an llDialog script in the same prim that allows for
//configuration of the trigger height, etc. This should be cut and dry.
message(integer sender_num, integer number, string message, key some_key)
{
if(llList2String(llParseString2List(message,[" "],[]),0) == "deployAltitude";)
{
//llOwnerSay("Trigger set";);
chuteHeight = llList2Integer(llParseString2List(message,[" "],[]),1);
llMessageLinked(LINK_ALL_OTHERS,chuteHeight, "", "";);
}
if(llList2String(llParseString2List(message,[" "],[]),0) == "Launch";)
{
//llOwnerSay("Trigger set";);
integer pushStrength = llList2Integer(llParseString2List(message,[" "],[]),1);
llPushObject(llGetOwner(),<0,0,pushStrength*llGetMass()>,<0,0,0>,FALSE);
llOwnerSay("Launching!";);
}
if (llList2String(llParseString2List(message,[" "],[]),0) == "Switch" && llList2String(llParseString2List(message,[" "],[]),1) == "On" )
{
llSetColor(<0.5,0.5,1>,ALL_SIDES);
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-18-2007 02:52
Is this code from the terra chute? I didnt think it was public domain.
The deployAltitude line is the one that does it but the code you have posted is ghastly and could really do with an overhaul.

CODE

//this script accepts input from an llDialog script in the same prim that allows for
//configuration of the trigger height, etc. This should be cut and dry.
message(integer sender_num, integer number, string message, key some_key)
{
list ldata = llParseString2List(message,[" "],[]);
string command = llList2String(ldata,0);
string param = llList2String(ldata,1);
integer value = (integer)param;

if("deployAltitude" == command)
{
//llOwnerSay("Trigger set");
chuteHeight = value;
llMessageLinked(LINK_ALL_OTHERS,chuteHeight, "", "");
}
else if("Launch" == command)
{
//llOwnerSay("Trigger set");
llPushObject(llGetOwner(),<0,0,value*llGetMass()>,<0,0,0>,FALSE);
llOwnerSay("Launching!");
}
else if( ("Switch" == command) && ("On" == param )
{
llSetColor(<0.5,0.5,1>,ALL_SIDES);

// End of Code fragment ???
Bilbo Goodliffe
all around good guy
Join date: 30 Dec 2005
Posts: 22
01-18-2007 05:05
From: Newgate Ludd
Is this code from the terra chute? I didnt think it was public domain.
The deployAltitude line is the one that does it but the code you have posted is ghastly and could really do with an overhaul.



no i would never post one from terrachute, I was just trying to follow this script and was having trouble