|
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
|
10-16-2008 07:25
heyas;
i play a triv game with a, shall we say, very chatty group. and the triv game parses everybody's responses on open chat. so.... after a few questions, this thing lags waaaaaay behind.
i'm creating something similar, and am worried about this effect. does anybody know a good way to avoid the bottleneck without resetting the script all the time? would doing a listen remove right when a correct answer is found help? or is there a way to flush the listen queue, specifically? maybe a state change would help? :/
any ideas/experience with this?
_____________________
Why Johnny Can't Rotate: http://forums.secondlife.com/showthread.php?t=94705
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
10-16-2008 07:46
if it needs to listen specifically and only for the answer, would using a string filter work? IE:
llListen(0,"","", correct answer)
i don't work with listens very often, so i'm not sure, just an idea
but i guess with that method it wouldn't be able to work with slight misspelling and would be case sensative
|
|
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
|
10-16-2008 09:21
could they not rather reply on a different channel?
such as \10 My Answer
|
|
Zolen Giano
Free the Shmeats!
Join date: 31 Dec 2007
Posts: 146
|
10-16-2008 12:12
Make it like they have to click a button, or a buzzer type thing like a game-show has.
This opens a listen on the toucher's key....then close the listen in the listen event and also close it in a timer event too if the listen event don't fire in a set time.
This could be in a seperate script that sends the message via linked messages to the main script. This way the main script don't need any listens open itself and just watches for the linked messages comming in from the buzzers.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
10-19-2008 00:14
llListenControl() might help if you are tempted to remove the listen but will have it active again in the future. http://www.lslwiki.net/lslwiki/wakka.php?wakka=llListenControl
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
10-19-2008 23:54
From: Ruthven Willenov if it needs to listen specifically and only for the answer, would using a string filter work? IE:
llListen(0,"","", correct answer)
i don't work with listens very often, so i'm not sure, just an idea
but i guess with that method it wouldn't be able to work with slight misspelling and would be case sensative You're absolutely right, but to expand a bit, you'll generate a question and answer and store the answer in a string i.e. : answer="whatever"; Most likely you'll pull the right answer off of a list, or read it from a notecard, in either case, you'll set the answer to a string. Then you'll define the listen as such... handle = llListen (0,"",NULL_KEY,answer); that'll setup the listen, and the device will ignore all chat except the right answer, once the right answer is heard, in the listen event, remove the listen, do your scoring and such, and read the next question/answer and loop back around.
_____________________
My tutes http://www.youtube.com/johanlaurasia
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
10-20-2008 07:11
yeah, that's what i meant. but it would be irritating to have it case sensative. guess it would be easier to make sure it's all lowercase since most people answer that way, but if you're getting the answers from an outside server it might not work as well. i have come upon a few trivia games that have multiple answer questions. the answers are listed with capital 1st letters, but the answer it listens for is all lowers (and case sensative) if i see an answer with a cap letter, i would be proned to answer that way, kinda irritating. same with a number with a comma, but it looks for an answer without the comma
|
|
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
|
10-24-2008 11:13
heyas;
yeah.... no, im not filtering the incoming chat; i'm doing keyword checking multiple answers.
i guess i will have to run it in a crowd and see if it bogs down. i'll look up if listen control does anything different than listen remove... that could be useful.
thanks guys!
|