Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

To Get Information

Drazel Bobak
Registered User
Join date: 22 Feb 2007
Posts: 1
03-12-2007 01:19
I have a question.
How can I get information about another avatar in sl? if its running, walking, sit...etc.
And how can I get information about an object in the world(if the object is not mine)? If its used, for example.

Thank you!!
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
03-12-2007 04:08
In answer to your first question, the Wiki is your friend.

As for your second, it depends on what you mean by "its used". If you mean worn as an attachment, then no, you cannot get any information about any object worn by another avatar. Otherwise, you can get some limited info using llSensor/llSensorRepeat (see the llDetected* functions in the Wiki for an idea of what you can discover about another object).
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
03-12-2007 07:39
To expand upon the wiki link, you probably want to use llGetAgentInfo for your agent detection functions. It can detect if someone is flying, in mouselook, sitting, away, walking, in the air, typing, crouching, busy, or running.

To paraphrase the example from the wiki,
CODE

// when touched, check if the agent is flying and say so.
default
{
touch_start(integer total_number)
{
// llGetAgentInfo returns a bitfield. Use & instead of == for comparisons.
if (llGetAgentInfo(llDetectedKey(i)) & AGENT_FLYING)
{
llSay(0, llDetectedName(i) + ", you're flying.");
} else
{
llSay(0, llDetectedName(i) + ", you're not flying.");
}
}
}