Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How to record chat command location?

bucky Barkley
Registered User
Join date: 15 May 2006
Posts: 200
07-30-2006 12:50
I want to record the position I was standing in when giving a chat command.

What's the best way to do this? A short range scan on agents, checking
for the one that is me?
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
07-30-2006 14:01
This depends on whether or not you're using the script in an attachment.

If you are, it's easy. Just record the output from llGetPos().

If this is for a stationary object, then yes, sensors are your best option.

Alternatively, you might consider using an attachment AND a stationary object. The attachment would contain a listener, wait for your chat command, and then report your current position to the stationary object. Without knowing your specific plan, I can't offer really good advice here, but if you DO decide to go ahead with this option, remember to use the changed() event with CHANGED_REGION to determine if you're in the same sim as your stationary object. That way, it'll only run the check once per time you change sims, and not leave an open listener.
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog
bucky Barkley
Registered User
Join date: 15 May 2006
Posts: 200
avoiding attachment
07-30-2006 15:25
If I can, I want to avoid an attachment. I want to be able to wander around and record positions in a house/property. The idea is to make it super simple for a user to store that data "/23add foyer" etc.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
07-30-2006 20:02
Start with a listen event.
if string matches up trigger a sensor event with llSensor to scan for said Agent Key.
use llDetectedPos in the senor event to find postion of said Agent Key.