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;
{ // 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); }
Question
Sarrah12
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
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