woodierider Posted July 7, 2017 Share Posted July 7, 2017 Hi, can anyone help me with a script that adds a hovering text, ( not text in chat) when someone steps on a carpet.I want the text to name the person. Link to comment Share on other sites More sharing options...
Luke Rowley Posted July 7, 2017 Share Posted July 7, 2017 (edited) You can use the event collision_start() and use llDetectedName(0); to get the name of the avatar that steps on your carpet. Then, you just need to display it using llSetText(); Edited July 7, 2017 by Heyter Nitely Links Link to comment Share on other sites More sharing options...
Rachel1206 Posted July 7, 2017 Share Posted July 7, 2017 Place the following in the root of the carpet. default { state_entry() { } collision_start(integer n) { // Do not display owner if (llDetectedType(0) & AGENT && llDetectedKey(0) != llGetOwner()) { string strName = llKey2Name(llDetectedKey(0)); llSetText( strName, <0.004, 1.000, 0.439>, 1.0 ); } else llSetText("", ZERO_VECTOR, 0); } } I leave it to you to improve with for example a time out or handling if more than one person stepping onto the carpet. Link to comment Share on other sites More sharing options...
woodierider Posted July 7, 2017 Author Share Posted July 7, 2017 thanks for your help, very grateful 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