Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Next question...multiple lists, each defined to a different string

Eric Stuart
Registered User
Join date: 5 Jul 2006
Posts: 203
06-17-2008 15:43
I've recently found the wonders of "lists" in scripting (I even called home and told my folks...they hung up on me) and have been adding it to alot of my scripting but I've hit a shag. Again. I'm not sure if I can even do this but I'm wondering if I can.

I have a group of lists...each list has a number of items under it. I'll keep with the example I had in my other thread.

list normal = ("test 1", "test 2";);
list stunned = ("test 3", "test 4";);

I have my other script (the one that changes the status) set to respond on a channel when its asked for the current status, so it will take the status given by the "status" script and input it into a variable in the "attacks" script, allowing it to match up with a certain list.

So, is this possible? If so, how? I was figuring something along the lines of an integer or a way to match a list to a specific string, but I'm still a bit new to that stuff (and I'm about to crash LSLwiki with as much info as I've went through). Also, any other good sites I can go to for LSL scripting? Thanks!
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
06-17-2008 16:31
you kinda answered your own question, just send a var that repersents which list you want to use and then use a if
Eric Stuart
Registered User
Join date: 5 Jul 2006
Posts: 203
06-17-2008 18:03
...oh, wow...I guess I did...

I was just brainstorming as I wrote it. I guess it ended up being a solution inside itself.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
06-17-2008 18:44
Hey welcome to the scripting forum. As far as other places, I have two recomendations. The Scripting Library here and to download and install LSLEditor.

LSLEditor by one of own also gives you the choice fo 3 different wikis to answer your questions or get info one a specific function.

http://www.lsleditor.org/

Hope to see more questions from you.
_____________________
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