Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Newbie lost in scripting land needs trail of breadcrumbs...

Gabriel Lemieux
Consumate Newbie
Join date: 28 Aug 2005
Posts: 18
10-16-2005 06:41
Hi guys! Thanks in response to any and all replies...

I'm very new to Second Life and I'm having a ton of fun building. I have an idea for various sets of attachments, but I'd like to take them one step further and actually make them do things. Nothing ambitious: I'd just like them to be able to change color and materials, as I've seen is the trend lately (lots of color-customizable stuff).

I've been pouring over the LSL wiki, and my head is spinning. I'm no stranger to programming, although I'm rather inexperienced, but I'm having a hard time figuring out how to get to the scripts I'd like to write.

Here's what I'd like to do, specifically:

I'm building a set of attachments (horns/spikes/jewelry/etc), and I'd like to be able to allow the owner (only the owner) to change their color or material (metal/glass/light) through the use of the pie menu (or a dialog menu if that's not feasable). For instance, there would be options for "Glass", "Metal", "Light", and "Color." The first three would change the attachment to the specified material, and the fourth would open up a dialog box with a list of colors.

I would also like to set slash-commands "/1234 Change the Color Even More" so that the owner could change the whole set at once without clicking on each individual attachment.

Now, changing attributes is easy enough. I figured out how to do that. What I need help with is the functionality. I saw a General Menu System over on the wiki which looks pretty good for my purposes (but I can't really understand what a lot of it does), but I'd still like to go through the pie menu if I can. I also have no idea how to set up those slash-commands -- haven't been able to find anything on it in the wiki yet.

I'm not asking for a lot, just a nudge in the right direction, if there are any tutorials I can look at, etc... any help at all is appreciated. The wiki is great, but it's sort of hard to use it alone to answer questions if you're as lost as I am.

Thanks! :)

-GLX
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
10-16-2005 08:05
Slash commands:

Slash commands work either through:

a) Private channel listen. These slash commands are the least lag-causing and least annoying to people around you. Look at the llListen command and the Listen event. It should be pretty self-explanatory.

b) llSubString catches. It'll parse a string and if the string comes up with the right beginning, run a series of if-statements. I do not suggest this method alone, because working on the public chat channel can cause lag while the object filters through EVERY chat entry made. llSubString CAN be useful on a private channel as well though.

Menus

I suggest working through an llDialog for your menus. The wheel menu really doesn't have that much functionality for us as players. And yes, you can have one dialog open another dialog. It all works through listen channels.
Gabriel Lemieux
Consumate Newbie
Join date: 28 Aug 2005
Posts: 18
10-16-2005 18:43
Thanks. :) I was looking at llDialog... that's what the General Menu System uses, and I'm going to take a more detailed look at that tonight.

llListen is now on my list, too.

Hopefully, between the two of them, I can figure this out on my own.

I appreciate the pointers. :)

-GLX