Difference between revisions of "TotalControl for LSL/Events/BOT LOCATION REPLY"
From SmartBots Developers Docs
Line 17: | Line 17: | ||
// Parse each group separated by a new line "\n" | // Parse each group separated by a new line "\n" | ||
list location = llParseString2List(str, ["\n"], []); | list location = llParseString2List(str, ["\n"], []); | ||
− | |||
− | + | llOwnerSay("Region: " + llList2String(location, 0)); | |
− | + | llOwnerSay("X: " + llList2String(location, 1)); | |
− | + | llOwnerSay("Y: " + llList2String(location, 2)); | |
− | + | llOwnerSay("Z: " + llList2String(location, 3)); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
} | } |
Revision as of 11:35, 5 March 2019
Raised when bot returns its location
Reference
This event comes with the following event object:
Variable | Required | Description | |
---|---|---|---|
event object properties: | |||
str | List of roles in the format "region\nx\ny\nz" | ||
id | --- |
Example
link_message( integer sender_num, integer num, string str, key id ) {
/////////////////// Bot list group reply event
if(num==BOT_LOCATION_REPLY) {
// Parse each group separated by a new line "\n"
list location = llParseString2List(str, ["\n"], []);
llOwnerSay("Region: " + llList2String(location, 0));
llOwnerSay("X: " + llList2String(location, 1));
llOwnerSay("Y: " + llList2String(location, 2));
llOwnerSay("Z: " + llList2String(location, 3));
}
}