Jump to content

help please


Kaitlynn Rainforest
 Share

You are about to reply to a thread that has been inactive for 4787 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I found this script for a scale i want to make for my house. Is there any way to stop the scale for every time repeating the text example

 

[20:37]  Object: Kaitlynn Rainforest your mass is 75.83 kilograms.
[20:37]  Object: Kaitlynn Rainforest your weight is 166.82 pounds.
[20:37]  Object: Kaitlynn Rainforest your mass is 75.83 kilograms.
[20:37]  Object: Kaitlynn Rainforest your weight is 166.82 pounds.

 

 

and it doubles it self

heres the script.

 

integer precision=2;

 

string es_round(float num, integer precision)

{

list tmp=llParseString2List((string) num, ["."],[]);

string major=llList2String(tmp,0);

 

float pow=llPow(10,precision);

 

float minor=(float) ("0." + llList2String(tmp,1));

integer iMinor=llRound(minor * pow);

 

return(major + "." + llGetSubString((string) iMinor,0,precision-1)); 

}

default

{

 

touch(integer n)

{

float avmass = llGetObjectMass( llDetectedKey(0));

float avmassk = avmass * 41.39;

string roundavmass = es_round(avmassk,precision);

 

 

llSay(0, llDetectedName(0) + " your mass is " + (string)roundavmass + " kilograms."); // the first parameter , 0, is the channel that the following string will be said on.

 

float avmassp = avmass * 91.05;

roundavmass = es_round(avmassp,precision);

 

 

llSay(0, llDetectedName(0) + " your weight is " + (string)roundavmass + " pounds."); // llDetectedName(0) is the name of the avatar who touched the prim.

}

 

}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4787 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...