Kc Brucato
Registered User
Join date: 16 Nov 2009
Posts: 2
|
11-23-2009 00:29
I have been working with c++ for a while and wnated to try out secondlife script. I have so far found it fun but ran into a snag. I need my script to run a check on the X, Y, Z position of a certain player and then return the values seperatly.
The script needs to find and return PlayerXcord, PlayerYcord, PlayerZcord.
Thanks.
|
Ron Khondji
Entirely unlike.
Join date: 6 Jan 2007
Posts: 224
|
Something like this?
11-23-2009 01:52
string Name = "Avatar Name"; float Range = 90.0; float Interval = 10.0;
default { state_entry() { llSetTimerEvent( Interval ); }
timer() { llSensor( Name, "", AGENT, Range, PI); } sensor(integer Num_Detected) { if( llDetectedName(0) == Name ){ vector Pos = llDetectedPos(0); llOwnerSay( Name + " X_pos = " + (string)Pos.x ); llOwnerSay( Name + " Y_pos = " + (string)Pos.y ); llOwnerSay( Name + " Z_pos = " + (string)Pos.z ); } } }
|
Kc Brucato
Registered User
Join date: 16 Nov 2009
Posts: 2
|
11-23-2009 10:27
Thank you very much for the fast reply!! I will try this out in game and see if it works for me.
|