Jump to content
  • 0

Script issues


Sarrah12
 Share

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

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

Question

Hello can anyone please tell me what's wrong in this script? Whenever i click on "female" for the dialog menu, the avatar doesnt animate. 

string animation;
string text = "touch more";
vector target = <-0.5,0,0>;// 0.5 wayy down in the ground,-0.6 left side of ball , 4..behind the ball
vector rot = <0,0,180>;
list MENU_MAIN = ["Default", "Male", "Female", "More..."]; // the main menu
list MENU_2 = ["Dance", "BB", "CC" , "...Back"]; // menu 2
string msg = "Please make a choice:";
key ToucherID;
integer CHANNEL; // dialog channel
integer listen_id;
float Timeout=20.0;
integer handle;
integer on = FALSE;
integer spaz = 0;
integer trap = 0;
key agent;

 

default{
state_entry()
{
CHANNEL = llRound(llFrand(1) * 100000);
llListenRemove(1);
llSetTimerEvent(Timeout);
llSetText(text,<1,1,1>,1);

}

on_rez(integer start)
{
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
animation = llGetInventoryName(INVENTORY_ANIMATION,0);
llListen(3,"",llGetOwner(),"");
}

 

touch_start(integer total_number)
{
llOwnerSay("Listener Turned On");
integer handle = llListen(CHANNEL, "",agent, ""); // listen for dialog answers
llListenControl(handle, TRUE); // ...enable listen
integer perm = llGetPermissions();
llDialog(llDetectedKey(0), "What do you want to do?", MENU_MAIN, CHANNEL); // present dialog on click
}

run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStartAnimation(animation);
}
}

listen(integer CHANNEL, string name, key id, string message)
{
if (llListFindList(MENU_MAIN + MENU_2, [message]) != -1) // verify dialog choice

{
// llOwnerSay(name + " picked the option '" + message + "'."); // output the answer
if (message == "More...")
llDialog(id, "Pick an option!", MENU_2, CHANNEL); // present submenu on request
else if (message == "...Back")
llDialog(id, "What do you want to do?", MENU_MAIN, CHANNEL); // present main menu on request to go back


else if (message == "Female")
{

integer perm = llGetPermissions();
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
if (llToUpper(message) == "OFF")
{
llStopAnimation(animation);
}
else if (llToUpper(message) == "ON")
{
// setup_pose();
llStartAnimation(animation);
}

}
}


}


}

timer()
{
llSetTimerEvent(0);
llOwnerSay("Listener Turned Off");
llListenControl(handle, FALSE);
}
}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Heya Sarrah12,

you might have more luck with posting LSL related questions and help requests in the appropriate forum: 
http://community.secondlife.com/t5/LSL-Scripting/bd-p/LSLScripting

There are many scripters around willing to help and guide with good tips and solutions.

But after flying fast over it. The menupoint is 'Female' (capital letter at the beginning)
Try changing the -->  else if (message == "female") into --> else if (message == "Female")

Cheers!

Link to comment
Share on other sites

  • 0

Seems Rolig found the issue already ( have a look at her answer again). I just had a fast look and just pointed out what popped me in the eye - so to say. But seems Rolig had a closer look and answered it already on your older Post.

But yes in general its best to keep these things in the LSL forum section.

Good luck with fixing your script =)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4000 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...