LlRegionSayTo/ru

From Second Life Wiki
< LlRegionSayTo
Revision as of 11:33, 27 August 2012 by Highstaker Resident (talk | contribs) (Created page with "{{LSL_Function/ru |inject-2={{Issues/SCR-66}} {{LSL_Function/chat/ru|channel|msg|nd=*|direct=*}} {{LSL_Function/uuid/ru|target|sim=*}} |func_id=363 |func_sleep=0.0 |func_energy=1…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Общая информация

Function: llRegionSayTo( key target, integer channel, string msg );

Отправляет сообщение, обозначенное в строке msg на канале номер channel объекту или аватару, обозначенному ключом target

• key target UUID аватара или примитива, находящегося в том же регионе
• integer channel канал вывода , любое целочисленное значениеexcept DEBUG_CHANNEL
• string msg произносимое сообщение
Channel Constant Description
PUBLIC_CHANNEL 0x0 Канал, используемый для передачи данных определенному примитиву или пользователю.

Предостережения

  • Messages sent on PUBLIC_CHANNEL are throttled to a rate of <200/2sec, per region, per owner/user.
    • Once the rate is exceeded, all following messages on PUBLIC_CHANNEL will be dropped until the send rate is again below 200/2sec for the previous 2 sec. Dropped messages, despite being dropped still count against the limit.
  • Сообщение передаётся только обозначенному аватару или объекту, и если он находится в том же регионе, что и объект со скриптом.
  • Скрипты в целях, отличных от target не слышат этих сообщений. Исключение составляют, в некоторых случаях, аттачменты (см. ниже).
  • Максимальная длина текста - 1023 байта.
  • Примитив не может слышать сам себя, это сделано для избежания рекурсии. Однако, он может слышать другие примитивы связанного объекта.
  • Отправление сообщений на канале DEBUG_CHANNEL не поддерживается в данной функции.
  • Если сообщение отправляется аватару на нулевом канале, оно будет отображено в его чате.
  • Если сообщение отправляется аватару на ненулевом канале, его могут слышать любые аттачменты (объекты, присоединённые к аватару) на аватаре.
All Issues ~ Search JIRA for related Bugs

Примеры

<lsl>default {

   touch_start(integer i)
   {
       llRegionSayTo(llDetectedKey(0), 0, "You touched this!");
   }
}</lsl>

Заметки

  • Channel 0 is the PUBLIC_CHANNEL. This should only be used for chat intended to be sent to the viewer.
  • If one object 'says' something to another object (e.g., a button that, when touched, turns on a lamp), it is a good idea to use a very negative channel, e.g.,

<lsl>

   llRegionSayTo("55499a64-45c3-4b81-8880-8ffb5a7c251b",-5243212,"turn on");

</lsl> Negative channels are popular for script communications because the standard Second Life client is unable to chat directly on those channels ("/-xxxx message" won't chat "message" on channel "-xxxx", it will chat "/-xxxx message" on channel zero). The only way to do so prior to llTextBox was to use llDialog, which is limited to 24 characters, or certain third-party viewers.

См. также

События

•  listen Receives chat

Функции

•  llListen Ask for listen events
•  llInstantMessage Sends chat to a specific avatar, inside our outside the current region.
•  llOwnerSay Sends chat to the owner only to avoid spamming the PUBLIC_CHANNEL
•  llRegionSay Sends chat region wide
•  llSay Sends chat limited to 20 meters
•  llShout Sends chat limited to 100 meters
•  llWhisper Sends chat limited to 10 meters

Статьи

•  Hello Avatar

Углублённые заметки

All Issues

~ Search JIRA for related Issues
   llRegionSayTo() Fails to send messages to attachments on sitting avatars

Описания

function void llRegionSayTo( key target, integer channel, string msg );