Jump to content

Menu, Texture Change, Script help much appreciated.


Chipp Fall
 Share

You are about to reply to a thread that has been inactive for 4401 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Okay, so I've been looking around for a few days now, trying to tweak and merge menu change scripts with texture change scripts, and have had no success. I don't really know much about LSL scripting. 

I have four prims,
One root prim, three child prims.

I want the script to work; so once the root prim is clicked(/touched) a menu dialogue will come up prompting four options. 
Option one changes the texture of one child prim, and 'says' something in chat. 
Option two changes the texture of two child prims, and 'says' something in chat. 
Option three changes the texture of all (three) child prims, and 'says' something in chat. 
And option four deletes all (three) child prims and the root prim, and 'says' something in chat. 

I'm thinking I may need a script that recognizes the child prims by 'object name', I'm just not sure how to put all of this together. 

Link to comment
Share on other sites

This is the menu script that I already have:
 

integer CHANNEL_DIALOG_BOX;string owner;list lChoice = ["Take one.", "Take two.", "Take all.", "Ditch."];default{    state_entry()    {        CHANNEL_DIALOG_BOX = llRound(llFrand(99));        owner = llKey2Name(llGetOwner());        llListen(CHANNEL_DIALOG_BOX, "", NULL_KEY, "");                    }    on_rez( integer sparam )    {        llResetScript();    }        touch_start(integer total_number)    {        key id = llDetectedKey(0);        llDialog(id, "Interact with "  +owner+ "", lChoice, CHANNEL_DIALOG_BOX);     }    listen(integer channel, string name, key id, string message)    {           if (llListFindList(lChoice, [message]) == 0)            {        llSay(0, "You take one from the bag");        }        if (llListFindList(lChoice, [message]) == 1)        {        llSay(0, "You take two from the bag");        }        if (llListFindList(lChoice, [message]) == 2)        {        llSay(0, "you take three from the bag");        }        if (llListFindList(lChoice, [message]) == 3)        {        llSay(0, "You have ditched the item.");        }        if (llListFindList(lChoice, [message]) == 4)        {        llSay(0, "OPTION4 TEXT");        }}}           

 

Link to comment
Share on other sites

If You want to learn how to scipt, you should look at:

  1. This page dor changing the textures of the child prims
  2. The function descibed on the page linked above works with link numbers - but you suspect correctly that it is better to use the object names - link numbers are not very reliable. If you have problems figuring out how to check prim names fdor setting the properites of the child prims, you can always come back
  3. You can delete an object by calling llDie

NNow you should have all the ingredients for your soup - stir well! ;)

If, howver, you came here to get your script done for you, you're simply at the wrong place - go to a suiting commerce forum for that

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4401 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...