These forums are CLOSED. Please visit the new forums HERE
Feel Like Carmen Sandiego |
|
|
Fearsum Vellhi
Registered User
Join date: 29 Oct 2006
Posts: 19
|
07-16-2007 05:59
What I want seems like it should be simple, but I could find nothing in the wiki or any examples that offer any help. When an avatar touches a scripted prim, I want the script to be able to detect the position of the avatar, in region coordinates, and see where I am. Is there nothing that will do this, or am I maybe overcomplicating things?
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
07-16-2007 06:11
llDetectedPos(0) in a touch_start event, perhaps?
|
|
Joshua Philgarlic
SLinside.com
Join date: 29 Jan 2007
Posts: 143
|
07-20-2007 08:17
I made this one to show my position when I joined a Lucky Chair group.
default { state_entry() { llOwnerSay("Ready." ;} touch_start(integer total_number) { list koords=llParseString2List((string)llGetPos(),[","],["/"]); integer x=(integer)llDeleteSubString(llList2String(koords,0),0,0); integer y=(integer)llList2String(koords,1); integer z=(integer)llList2String(koords,2); llOwnerSay("http://slurl.com/secondlife/"+llGetRegionName()+"/"+(string)x+"/"+(string)y+"/"+(string)z); } } |
|
Milambus Oh
Registered User
Join date: 6 Apr 2007
Posts: 224
|
07-20-2007 09:01
While I'm sure you're code works, I don't believe it to be the most efficient way to handle things. Try this instead:
CODE
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
07-20-2007 10:53
do something like:
touch_start(integer num) { llSay(0,"My global coordinates are: " + (string)(llGetPos()+llGetRegionCorner())); llSay(0,"I am in " + llGetRegionName() + " at " + (string)llGetPos()); } _____________________
My SLExchange shop
Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work. |