| GetAgentSize 判断人物高度 |
| 作者:梦翔儿 日期:2007-7-15 15:12:00 |
default
{ touch_start(integer total_number) { vector size; //variable to hold size info size = llGetAgentSize(llDetectedKey(0)); //attach function to variable if(size.z >= 1.523) // if avatar is Greater than or equal to 1.5m { llSay(0,"You are over 5 feet"); //tell them they are tall enough } llSay( 0, // channel to is public "You are "+ //message (string)size.z+ //use the variable size to find z "meters tall."); } } ==================
default
{ touch_start(integer total_number) { vector size; //variable to hold size info size = llGetAgentSize(llDetectedKey(0)); //attach function to variable llSay( 0, // channel to is public "You are "+ //message (string)size.z+ //use the variable size to find z "meters tall."); if(size.z >= 2.0) // if avatar is Greater than or equal to 2.0m { llSay(0,"You are more than 2 meters"); //tell them they are tall enough } else if(size.z<2.0) { llSay(0,"You are less than 2 meters"); //say to them,they are less than 2 m. } |
