TaylaAtlantis Ashbourne Posted May 15, 2011 Share Posted May 15, 2011 There used to be a script out that measured the height and weight of an avatar by sitting on a prim....does anyone have a copy of that script or knows where to get it? Link to comment Share on other sites More sharing options...
Rolig Loon Posted May 15, 2011 Share Posted May 15, 2011 There are probably hundreds of scripts like that in SL. You can either write one yourself with llGetAgentSize and llGetMass or you can visit freebie places around SL. You can also try Marketplace or the Wanted section of the Commerce forums (http://community.secondlife.com/t5/Wanted/bd-p/Wanted). If you are looking for someone to write a script for you, the best place to ask is in the Inworld Employment section of the Commerce Forums (http://community.secondlife.com/t5/Inworld-Employment/bd-p/InworldEmployment). Link to comment Share on other sites More sharing options...
Void Singer Posted May 16, 2011 Share Posted May 16, 2011 /*( v7-D Height Estimator )*/float cFLT_GUESS = 1.09; //-- 1.12 seems better for smaller avs, animations can affect thisvector cCOL_RED = <1.0, 0.0, 0.0>;string uMeter2Feet( float vFltHgt ){ string vStrRtn; integer vIntInches = llRound( vFltHgt * 39.3700787 ); if (vIntInches > 11){ vStrRtn += (string)(vIntInches / 12) + "ft. "; } vIntInches %= 12; return vStrRtn + llList2String( ["even", ((string)vIntInches + "in.")], !!vIntInches );}uReset(){ vector vSizPrm = llGetScale(); llSetLinkPrimitiveParams( 3, [PRIM_TEXT, "Stand Here To Get\nYour Avatar Height", cCOL_RED, 1.0, PRIM_SIZE, <vSizPrm.x, vSizPrm.y, 0.17>] );}default{ state_entry(){ uReset(); } collision_start( integer vIntCld ){ if (llDetectedType( 0 ) & AGENT){ llSetTimerEvent( 0.0 ); vector vSizAgt = llGetAgentSize( llDetectedKey( 0 ) ) * cFLT_GUESS; vector vSizPrm = llGetScale(); llSetLinkPrimitiveParams( 3, [PRIM_SIZE, <vSizPrm.x, vSizPrm.y, (vSizAgt.z * 2)>, PRIM_TEXT, llDetectedName( 0 ) + "\n" + (string)((integer)(vSizAgt.z * 100.0)) + "cm\n" + uMeter2Feet( vSizAgt.z ), cCOL_RED, 1.0] ); llSetTimerEvent( 30.0 ); } } timer(){ uReset(); }} this is the height detector I use... it's only approximate because attachments like hair can make the results a little low, and there is a bug that only report the height to about the eyeball level, compensated by cFltGuess... so I included a part that shows the height detected visually (usually very close to normal and SL sized avatars, but reports upt to ~4inches low for child sized avatars and tinies) which you will be able to see... construction: root prim: box or cylinder color black + fullbright z-height 0.05m second prim: (sits on the root) same shape/width/length/color as root z-height: 0.12m hollow: 95.0 (this compensates for the physics engine causing the avatar to hover over prims they are standing on) third prim: (sits on top of the second) same shape/width/length as previous color: medium grey transparency: 50 slice: 0.5/1.0 z-height: 0.17m ETA: I've posted this because there are two non-obvious tricks learned from experience and testing, adding in weight whould be easy to do, and this gives a good example of how to do it (for instance providing a weight conversion function so you can use both Imperial and Metric measures) 1 Link to comment Share on other sites More sharing options...
TaylaAtlantis Ashbourne Posted June 2, 2011 Author Share Posted June 2, 2011 Thanks all but I made one myself, I know height and weight of and AV varies but I think I got my caluculations right and now have a workable script I can put into my scale that does feet, meters, punds, stones and kilograms. As i could not find anythign out there, I made my own:) Link to comment Share on other sites More sharing options...
Void Singer Posted June 2, 2011 Share Posted June 2, 2011 that's the spirit 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