Kaitlynn Rainforest Posted April 23, 2011 Share Posted April 23, 2011 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 selfheres 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 More sharing options...
Rolig Loon Posted April 23, 2011 Share Posted April 23, 2011 Yes. In this part... default { touch(integer n) { float avmass = llGetObjectMass( llDetectedKey(0)); Change the words touch(integer n) to touch_start(integer n) . That should do the trick. :smileywink: Link to comment Share on other sites More sharing options...
Kaitlynn Rainforest Posted April 23, 2011 Author Share Posted April 23, 2011 that did the trick ty so much Link to comment Share on other sites More sharing options...
Recommended Posts
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