CODE
default {
state_entry()
{
if( llGetListLength(notecardList)==0 )
{
notecard = "_Config";
state loading;
}
else
{
index = 0;
}
}
listen(integer channel, string name, key id, string m) {CODE
any guidance would be appreciated, thanks
These forums are CLOSED. Please visit the new forums HERE
state_entry question |
|
|
Knight Nootan
Registered User
Join date: 26 May 2008
Posts: 73
|
06-02-2009 17:20
Ok, what I am trying to figure out is in the state_entry at the top of the script I need to be able to ad a llListen and just cant get it to work, obviously I am missing something but it has me stumped as I have only been scripting for a few months now.
CODE
|
|
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
|
06-02-2009 19:28
Hi Knigh in the next link you can find an implementation of the listen event
http://wiki.secondlife.com/wiki/LlListen _____________________
![]() RAW terrain files - terraform your SIM!! http://www.wishland.info/ PD:the wiki its your friend ![]() http://wiki.secondlife.com/wiki/LSL_Portal |
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
06-02-2009 20:02
Knight --
llListen is a "handle," a filter that you can think of as a means of setting the rules by which a listen event responds to typed messages. Unless you set the rules first, the listen event has no way of telling which channel to listen on, who to listen to, or what sorts of messages are valid. This becomes especially important if you want the listen event to listen for and respond to more than one set of rules. You might want it to respond to the owner's key command on one channel, for example, and to a general user's input on a different channel. Each set of filtering rules requires a separate setup -- its own llListen handle. There's nothing magic about putting it in state_entry. It just has to be done before the listen event will be engaged. _____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
06-03-2009 10:46
Post an example llListen() call that you tried and tell us what's not working about it.
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
06-03-2009 11:02
I bet you're not clearing notecardList in state loading, so when you get back to default it's jumping right back to state loading over and over again.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |