Jump to content

Sarrah12

Resident
  • Posts

    23
  • Joined

  • Last visited

Posts posted by Sarrah12

  1. I have this camera controls script  for opensim.  But i cant seem to get the changes i want.  The one for "L_side cam(), i want it to be scripted such that the camera rotates around. In number 1 of the picture posted below, this is what i get wen i click on "L_side cam".  But i want to edit my script in such a way that wen i click on "L_side cam" i get picture #2 instead.

     final.jpg

    I'm posting the script below. If someone has a solution for it, please let me know.

    vector CamPos;
    rotation CamRot;
    vector CamFoc;
    integer CHANNEL; // dialog channel
    float Timeout=20.0;
    integer handle;
    //**********************
    list MENU_MAIN = ["Default", "Overhead Cam", "Focus On Me", "Hip Cam", "Drop Cam 5", "5M Large Av", "Driving Cam", "LOCK Cam", "UNLOCK Cam", "Cam ON", "Cam OFF", "More..."]; // the main menu
    //**********************
    list MENU_2 = ["Cr Shoulder", "L Shoulder", "R Shoulder", "L Side Cam", "R Side Cam", "Spaz Cam", "Spin Cam", "Worm Cam", "...Back"]; // menu 2

    integer on = FALSE;
    integer spaz = 0;
    integer trap = 0;
    key agent;

    take_camera_control(key agent)
    {
    llOwnerSay("take_camera_control"); // say function name for debugging
    llOwnerSay((string)agent);
    llRequestPermissions(agent, PERMISSION_CONTROL_CAMERA | PERMISSION_TRACK_CAMERA);
    llSetCameraParams([CAMERA_ACTIVE, 1]); // 1 is active, 0 is inactive
    on = TRUE;
    }

    release_camera_control(key agent)
    {
    llOwnerSay("release_camera_control"); // say function name for debugging
    llSetCameraParams([CAMERA_ACTIVE, 0]); // 1 is active, 0 is inactive
    llClearCameraParams();
    on = FALSE;
    }

    focus_on_me()
    {
    //llOwnerSay("focus_on_me"); // say function name for debugging
    llClearCameraParams(); // reset camera to default
    vector here = llGetPos();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 180.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.0, // (0 to 3) seconds
    CAMERA_DISTANCE, 0.0, // ( 0.5 to 10) meters
    CAMERA_FOCUS, here, // region relative position
    CAMERA_FOCUS_LAG, 0.0 , // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, TRUE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    // CAMERA_PITCH, 80.0, // (-45 to 80) degrees
    CAMERA_POSITION, here + <4.0,4.0,4.0>, // region relative position
    CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, TRUE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, ZERO_VECTOR // <-10,-10,-10> to <10,10,10> meters
    ]);
    }

    default_cam()
    {
    // llOwnerSay("default_cam"); // say function name for debugging
    llClearCameraParams(); // reset camera to default
    llSetCameraParams([CAMERA_ACTIVE, 1]);
    }


    driving_cam()
    {
    // llOwnerSay("driving_cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 90.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.5, // (0 to 3) seconds
    CAMERA_DISTANCE, 8.0, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_PITCH, 20.0, // (-45 to 80) degrees
    //CAMERA_POSITION, <0,0,0>, // region relative position
    CAMERA_POSITION_LAG, 0.1, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <3,0,2> // <-10,-10,-10> to <10,10,10> meters
    ]);
    }

    large()
    {
    // llOwnerSay("Large Av Cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 90.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.5, // (0 to 3) seconds
    CAMERA_DISTANCE, 8.0, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_PITCH, 20.0, // (-45 to 80) degrees
    //CAMERA_POSITION, <0,0,0>, // region relative position
    CAMERA_POSITION_LAG, 0.1, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <3,0,5> // <-10,-10,-10> to <10,10,10> meters
    ]);
    }

    r_shoulder_cam()
    {
    // llOwnerSay("right cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 5.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.5, // (0 to 3) seconds
    CAMERA_DISTANCE, 0.5, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 0.01 , // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_PITCH, 15.0, // (-45 to 80) degrees
    CAMERA_POSITION, <0.0,0.0,0.0>, // region relative position
    CAMERA_POSITION_LAG, 0.1, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <-0.5,-0.5,1.0> // <-10,-10,-10> to <10,10,10> meters
    ]);
    }

    l_shoulder_cam()
    {
    // llOwnerSay("left cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 5.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.5, // (0 to 3) seconds
    CAMERA_DISTANCE, 0.5, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 0.01 , // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_PITCH, 15.0, // (-45 to 80) degrees
    CAMERA_POSITION, <0.0,0.0,0.0>, // region relative position
    CAMERA_POSITION_LAG, 0.1, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <-0.5,0.5,1.0> // <-10,-10,-10> to <10,10,10> meters
    ]);
    }

    shoulder_cam()
    {
    // llOwnerSay("shoulder cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 5.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.0, // (0 to 3) seconds
    CAMERA_DISTANCE, 1.0, // region relative position
    CAMERA_FOCUS_LAG, 0.01 , // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_PITCH, 15.0, // (-45 to 80) degrees
    //CAMERA_POSITION, <0,0,0>, // region relative position
    CAMERA_POSITION_LAG, 0.1, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <0.0,0.0,1.0> // <-10,-10,-10> to <10,10,10> meters
    ]);
    }

    l_side_cam()
    {
    // llOwnerSay("l_side_cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 0.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.0, // (0 to 3) seconds
    CAMERA_DISTANCE, 3.0, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 0.0 , // (0 to 3) seconds
    // CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    // CAMERA_PITCH, 80.0, // (-45 to 80) degrees
    //CAMERA_POSITION, <0,0,0>, // region relative position
    CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds
    // CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <0,1.5,0> // <-10,-10,-10> to <10,10,10> meters
    ]);
    }

    r_side_cam()
    {
    // llOwnerSay("r_side_cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 0.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.0, // (0 to 3) seconds
    CAMERA_DISTANCE, 3.0, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 0.0 , // (0 to 3) seconds
    // CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    // CAMERA_PITCH, 80.0, // (-45 to 80) degrees
    //CAMERA_POSITION, <0,0,0>, // region relative position
    CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds
    // CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <0,-1.5,0> // <-10,-10,-10> to <10,10,10> meters
    ]);
    }

    overhead_cam()
    {
    // llOwnerSay("overhead_cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 180.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0, // (0 to 3) seconds
    CAMERA_DISTANCE, 1.7, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_PITCH, 80.0, // (-45 to 80) degrees
    //CAMERA_POSITION, <0,0,0>, // region relative position
    CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <0,0,0> // <-10,-10,-10> to <10,10,10> meters
    ]);
    }

    drop_camera_5_seconds()
    {
    // llOwnerSay("drop_camera_5_seconds"); // say function name for debugging
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 0.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.5, // (0 to 3) seconds
    CAMERA_DISTANCE, 3.0, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 2.0, // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_PITCH, 0.0, // (-45 to 80) degrees
    //CAMERA_POSITION, <0,0,0>, // region relative position
    CAMERA_POSITION_LAG, 0.05, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, TRUE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <0,0,0> // <-10,-10,-10> to <10,10,10> meters
    ]);
    llSleep(5);
    default_cam();
    }

    worm_cam()
    {
    // llOwnerSay("worm_cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 180.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.0, // (0 to 3) seconds
    CAMERA_DISTANCE, 3.0, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 0.0 , // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 2.0, // (0 to 4) meters
    CAMERA_PITCH, -30.0, // (-45 to 80) degrees
    //CAMERA_POSITION, <0,0,0>, // region relative position
    CAMERA_POSITION_LAG, 1.0, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 1.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <0,0,0> // <-10,-10,-10> to <10,10,10> meters
    ]);
    }


    spaz_cam()
    {
    // llOwnerSay("spaz_cam for 5 seconds"); // say function name for debugging
    float i;
    for (i=0; i< 50; i+=1)
    {
    vector xyz = llGetPos() + <llFrand(80) - 40, llFrand(80) - 40, llFrand(10)>;
    // llOwnerSay((string)xyz);
    vector xyz2 = llGetPos() + <llFrand(80) - 40, llFrand(80) - 40, llFrand(10)>;
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 180.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, llFrand(3), // (0 to 3) seconds
    CAMERA_DISTANCE, llFrand(10), // ( 0.5 to 10) meters
    //CAMERA_FOCUS, xyz, // region relative position
    CAMERA_FOCUS_LAG, llFrand(3), // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, TRUE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, llFrand(4), // (0 to 4) meters
    CAMERA_PITCH, llFrand(125) - 45, // (-45 to 80) degrees
    CAMERA_POSITION, xyz2, // region relative position
    CAMERA_POSITION_LAG, llFrand(3), // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, TRUE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, llFrand(4), // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <llFrand(20) - 10, llFrand(20) - 10, llFrand(20) - 10> // <-10,-10,-10> to <10,10,10> meters
    ]);
    llSleep(0.1);
    }
    default_cam();
    }

    hip_cam()
    {
    // llOwnerSay("hip_cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 0.01, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.05, // (0 to 3) seconds
    CAMERA_DISTANCE, 2.0, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 0.01 , // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_PITCH, 10.0, // (-45 to 80) degrees
    //CAMERA_POSITION, <0,0,0>, // region relative position
    CAMERA_POSITION_LAG, 0.01, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <0,0,0> // <-10,-10,-10> to <10,10,10> meters
    ]);
    }

    Lock()
    {
    llOwnerSay("Locking current camera position.");
    CamPos = llGetCameraPos();
    CamRot = llGetCameraRot();
    CamFoc = CamPos + llRot2Fwd(CamRot);
    llSetColor(<1,0,0>,ALL_SIDES);
    llSetCameraParams([
    CAMERA_ACTIVE, 1,
    CAMERA_FOCUS, CamFoc,
    CAMERA_POSITION, CamPos,
    CAMERA_FOCUS_LOCKED, 1,
    CAMERA_POSITION_LOCKED, 1
    ]);
    vector CamFocStr = CamFoc;
    vector CamPosStr = CamPos;
    }

    Unlock()
    {
    llSetColor(<0,0,1>,ALL_SIDES);
    llOwnerSay("Unlocking current camera position.");
    llSetCameraParams([
    CAMERA_ACTIVE, 1,
    CAMERA_FOCUS, CamFoc,
    CAMERA_POSITION, CamPos,
    CAMERA_FOCUS_LOCKED, 0,
    CAMERA_POSITION_LOCKED, 0
    ]);
    }


    spin_cam()
    {
    // llOwnerSay("spin_cam"); // say function name for debugging
    default_cam();
    llSetCameraParams([
    CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
    CAMERA_BEHINDNESS_ANGLE, 180.0, // (0 to 180) degrees
    CAMERA_BEHINDNESS_LAG, 0.5, // (0 to 3) seconds
    //CAMERA_DISTANCE, 10.0, // ( 0.5 to 10) meters
    //CAMERA_FOCUS, <0,0,5>, // region relative position
    CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds
    CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_PITCH, 30.0, // (-45 to 80) degrees
    //CAMERA_POSITION, <0,0,0>, // region relative position
    CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds
    CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
    CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
    CAMERA_FOCUS_OFFSET, <0,0,0> // <-10,-10,-10> to <10,10,10> meters
    ]);

    float i;
    vector camera_position;
    for (i=0; i< 2*TWO_PI; i+=.05)
    {
    camera_position = llGetPos() + <0, 4, 0> * llEuler2Rot(<0,0,i>);
    llSetCameraParams([CAMERA_POSITION, camera_position]);
    }
    default_cam();
    }

     

    default
    {
    state_entry()
    {
    CHANNEL = llRound(llFrand(1) * 100000);
    llListenRemove(1);
    llSetTimerEvent(Timeout);
    }

    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();


    if (perm & PERMISSION_TRACK_CAMERA)// | (perm & PERMISSION_CONTROL_CAMERA)
    { llOwnerSay("Permission Given");}

    if (perm == 0)
    { llOwnerSay(llGetScriptName() + " has NO perms for "+(string)llGetPermissionsKey()); }

    llDialog(llDetectedKey(0), "What do you want to do?", MENU_MAIN, CHANNEL); // present dialog on click
    }

    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 == "Cam ON")
    {
    take_camera_control(id);
    }

    else if (message == "Cam OFF")
    {
    release_camera_control(id);
    }

    else if (message == "Default")
    {
    default_cam();
    }

    else if (message == "Driving Cam")
    {
    driving_cam();
    }

    else if (message == "5M Large Av")
    {
    large();
    }

    else if (message == "L Shoulder")
    {
    l_shoulder_cam();
    }

    else if (message == "R Shoulder")
    {
    r_shoulder_cam();
    }

    else if (message == "Cr Shoulder")
    {
    shoulder_cam();
    }

    else if (message == "Worm Cam")
    {
    worm_cam();
    }

    else if (message == "Overhead Cam")
    {
    overhead_cam();
    }

    else if (message == "Spaz Cam")
    {
    spaz_cam();
    }

    else if (message == "L Side Cam")
    {
    l_side_cam();
    }

    else if (message == "R Side Cam")
    {
    r_side_cam();
    }

    else if (message == "Drop Cam 5")
    {
    drop_camera_5_seconds();
    }

    else if (message == "Hip Cam")
    {
    hip_cam();
    }

    else if (message == "LOCK Cam")
    {

    Lock();
    }


    else if (message == "UNLOCK Cam")
    {
    Unlock();
    }

    else if (message == "Focus On Me")
    {
    trap = !trap;
    if (trap == 1) {
    llOwnerSay("focus is on me");
    focus_on_me();
    }
    else {
    llOwnerSay("focus is off me");
    default_cam();
    }
    }


    else if (message == "Spin Cam")
    {
    spin_cam();
    }

    } else
    llOwnerSay(name + " picked invalid option '" + llToLower(message) + "'."); // not a valid dialog choice
    }

    run_time_permissions(integer perm) {
    if ((perm & PERMISSION_CONTROL_CAMERA) == PERMISSION_CONTROL_CAMERA) {
    llSetCameraParams([CAMERA_ACTIVE, 1]); // 1 is active, 0 is inactive
    llOwnerSay("Camera permissions have been taken");
    }
    }

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

  2. hmm, i checked it out. You're right, they do have beds working with mlpv2. But then again, like SL you need to pay for all the things in Avination.  I'm currently working on a research project and we don't have much money to spend, which is why OS grid was perfect for us. it would have been nice if there was any other altenative.

     

  3. Hello,

    Has anyone had any success running MLPV2 in Opensim?I'm new to scripting and i'm struggling trying to get the scripts to compile. I test all my animations in OS grid, so it would be really helpful if i get the MLPV2 running. If anyone has any tips regarding this, please let me know. 

    Thank you in advance:)

     

  4. I'm looking for a script where i can have a couple of animations running one after the other once i click on the touch option.  usually i only have one animation playing for oen script. but this time i want it to move from one animation to the other.

     

     

  5. I have a question abt the script that you wrote.   For this part :

    else if (llGetInventoryType(message)==INVENTORY_ANIMATION || "Stop"==message){// if it's animation in my inventory or the message is "Stop"
    animation = message;
    if(llGetPermissions()&PERMISSION_TRIGGER_ANIMATION){
    if ("Stop"==animation){
    llStopAnimation(animation);
    }
    else{
    llStartAnimation(animation);
    }
    }
    else{
    llRequestPermissions(id,PERMISSION_TRIGGER_ANIMATION);
    }

     

    How will it know which options will play which animations?Because i wanna put different animations for different options

     

  6. I want to make a dialog menu. If you click on the "more" option from first menu , it gives you a second menu, and if you click on "back" option from second menu, it brings you back to the first menu. i also want to connect animations in all the options.

     

    So say in menu 1 i have " danceA, dance B, more"... and in menu 2 i have "dance C, dance D, back". If i click on dance A, it shuld start playin a specific anaimation attached to it and same for dance B, etc.

     

    Thank you.

  7. Hello. Can anyone please tell me what's wrong with this script. After i click on "Female", the animation doesnt start.

     

     

    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(),"");
    llSetText(text,<1,1,1>,1);
    llSetAlpha(1.0,ALL_SIDES);
    llSitTarget(target,llEuler2Rot(rot*DEG_TO_RAD));



    }

     

    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);
    }
    }

  8. 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);
    }
    }

  9. hello, can you please tell me what's wrong with this script?

    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{

    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);

    }

    }

  10. Hello,

     

    I just needed help with a simple script. I have a "slow dance" animation. Usually i put a sitting script in the prim with the "slow dance" animation. So whenever i click on "sit", the avatar starts dancing. But how can u change the script such that when i click on "touch", the avatar starts slow dancing.  I can't seem to find a script for the "touch" option anywhere.

     

    Thank you,

    Sarrah

  11. Hello,

    if i have an animation that involves two ppl slow dancing or kissing, do i need a hug script or hug animation to connect the two avatars? I'm not sure what a hug script is used for. And where can i get a hug script from?

  12. Hello,

    I'm doing a research project and I'm trying to connect Max/msp to Second Life.  I was thinking of making a proxy using libsecondlife but since i'm new to this, I'm having some problem with it.

    Is there any tutorials on how to make it? and also where can i download the libsecondlife?

    Thanks,

    Sarrah

    P.S: Max/Msp is a graphical programming environment for music and media applications.

     

     

     

×
×
  • Create New...