llDetectedType
function
Function syntax
integer llDetectedType(integer number// Index of the detection information.
);- Returns
integer- Energy
- 10
Returns an integer bitfield representing the types (AGENT, ACTIVE, PASSIVE, or SCRIPTED) of the detected object or avatar specified by number. Returns 0 if number is not a valid index.
Returns zero if number is not valid sensed object or avatar.
Returns an integer that is the types of the detected object or avatar.
integer result = llDetectedType(0);Specification
Section titled “Specification”
| |||||||||||||||||||||||||||||||||||||||||||||||
Examples
Section titled “Examples”Example 1
6 collapsed lines
//--// Type & name of collision source //--//
default{ collision_start( integer vIntCollided ){ integer vBitType; string vStrType; do { vBitType = llDetectedType( --vIntCollided ); if (vBitType & AGENT_BY_LEGACY_NAME) vStrType = "avatar";7 collapsed lines
else vStrType = "object"; llOwnerSay( "An " + vStrType + " named '" + llDetectedName( vIntCollided ) + "' collided with me" ); } while (vIntCollided); }}Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.