Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
12-19-2005 12:54
How could an AV's current postion be recored by a scripted object, when the AV touches or chats with the object. I know I could just tell it the XYZ coordinates, but how could it be made automatic. Thanks in advance Mod
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
12-19-2005 13:05
With touch, calling llDetectedPos(0) inside touch_start will give you the av's coordinates (assuming only one person is touching it at that time, which is usually the case). With chat, there's no direct way to do it. You'll have to send out a sensor scan for the person (which you can do because you'll have his name and his key in the listen handler), and then in the sensor handler, you can again use llDetectedPos(0).
Take a look at the llDetected* functions, you can find out quite a bit of information about the av who triggered the touch/sensor/collision.
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
Ziggy, further AV position question
12-19-2005 14:37
Your AV's postion is displayed on the top bar of the screen at all times. That means the your computer is receiveing that data. Isn't the a way to capture that data though a script?
Mod
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
12-19-2005 14:41
Yes. If you're wearing a scripted object, calling llGetPos() inside that object will return your av's position, I think. But that doesn't mean that every object in-world that's visible on your screen also knows your av's position.
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
Thanks
12-19-2005 15:01
Thank you again for your efforts.
MOD
|