Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Multiple Listen Perhaps?

Haplo Voss
Registered User
Join date: 18 Nov 2006
Posts: 137
02-19-2008 18:58
Greets again. I've tried searching and have probably failed to use the correct keywords.

I simply have a situation where I have multiple dialog menus - everything works fine.

If the owner clicks on the item, a different initial menu opens up and asks if they would like to set this item as Pay2Use, Use, or Cancel.

Here's my problem. I'm trying to work with listeners and timers and everything else I've found, but what I need is for when they click the Pay2Use button, it will take the next thing they type into the chat box and "set" it as the pay price.

So in a nutshell, how can I setup a listener, or other event I'm not thinking of, to accept the input of the next line from chat 0, so I can stick it in a variable?

Did any of that make sense?

I'd be happy to post some code although I don't know if my code would be more helpful or confusing as to what I need to accomplish.

Thanks!
- Hap
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
02-19-2008 19:30
Two ways to do it.

The SetPrice button defines & opens a listen on channel 0. And you have an if test in the listen event such as

if(0 == channel){
llListenRemove(listen handle for channnel 0);
price = message;
etc.

Or what I have also done is change to another state instead and that state handles the listen on channel 0 stuff, recieves the message, sets the price, removes the listen and changes back to state default.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Haplo Voss
Registered User
Join date: 18 Nov 2006
Posts: 137
02-19-2008 19:48
Thanks tons. That's exactly what I needed. I had the right idea but was getting my logic reversed on how to handle the second listen event.

Much appreciated.
- Hap