Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Say/Shout/RegionSay algorithm on the sim?

Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
04-12-2008 09:52
I know I've seen, somewhere, somewhen, a quote from a coding Linden that talked about the order of how things happen in the sim code when somebody uses one of the chat functions.

Something like 'first it finds the list of things listening on that channel then it checks if the speaker is in range' etc, etc..

I've looked around but can't seem to find this now. :( Anybody remember this and, if so, can you post a link to it??

TY!
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
04-12-2008 09:59
I know I have seen it on the forum but here is a repost.

https://lists.secondlife.com/pipermail/secondlifescripters/2007-November/001993.html

From: kelly linden

The actual order of events is:
1. Chat that is said gets added to a history.
2. A script that is running and has a listen event will ask the history
for a chat message during its slice of run time.
3. When the script asks the history for a chat message the checks are
done in this order:
- channel
- self chat (objects can't hear themselves)
- distance/RegionSay
- key
- name
- message
4. If a message is found then a listen event is added to the event queue.

The key/name/message checks only happen at all if those are specified of
course.

So, the most efficient way is llRegionSay on a rarely used channel.
_____________________
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
04-12-2008 10:23
Ty!!