Jump to content

glawrence Congrejo

Resident
  • Posts

    8
  • Joined

  • Last visited

Posts posted by glawrence Congrejo

  1. I'm at this way:

    listen(integer channel, string name, key id, string message)    {    if (message == "//Button 1")        {        llSetPrimitiveParams([PRIM_POSITION, < x, y, z>, llEuler2Rot(< x, y, z> * DEG_TO_RAD)]);         }

    Just changed that and deleted the reset button to make it work.
    But still with the error problem.

  2. Thanks all for your help, you're awesome.

    I followed your tips,  removed the "Reset" button because it was only to prevent a "space invader glasses", if I eject the glasses away.

    Allok, but I receive themsg

    llSetPrimitiveParams error running rule #2: non-integer rule.


    I know there is missing a "integer MISSING RULE" in the beginning of the script but don't know how to insert it.

  3. Hi there,
    How are your guys? As you can see, I'm a complete newbie in this forum but I hope you help me out.

    I'm trying to make simple script to move a Glasses To Head and To Face.

    I have two problems:
    - I need to make the script work in a random Chanel or Owner only. (What's more effective/safe);
    - I Have the coordinates of my avatars targets( above the noise and above the head[preventing hair]). The glasses keeps turning without the correct position.

    Please try to explain to me what you doing, I realy want to learn.

    Thanks

    There is the code:

     

    list buttons = ["Reset", "To Face", "To Head"];
    string dialogInfo = "\nPlease make a choice.";
     
    key ToucherID;
    integer dialogChannel;
    integer listenHandle;
     
    default
    {
        state_entry()
        {
            dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) );
        }
     
        touch_start(integer num_detected)
        {
            ToucherID = llDetectedKey(0);
            llListenRemove(listenHandle);
            listenHandle = llListen(dialogChannel, "", ToucherID, "");
            llDialog(ToucherID, dialogInfo, buttons, dialogChannel);
            llSetTimerEvent(10.0); // To prevent
        }
     
        listen(integer channel, string name, key id, string message)
        {
            if (message == "Reset")
            {
                llDialog(ToucherID, dialogInfo, buttons, dialogChannel);
              llSetPrimitiveParams([PRIM_POSITION, <-0.02654, 0.00000, 0.01689>, PRIM_ROTATION, <0.00000, 90.00000, 0.00000,1.0>]); 
    // Primitive head position
                return;
                llResetScript();
            }
     
            llListenRemove(listenHandle);
            //  stop timer since the menu was clicked
            llSetTimerEvent(0);
     
            if (message == "To Head")
            {
            llSetPrimitiveParams([PRIM_POSITION, <-0.02654,-0.00001, 0.08305>, PRIM_ROTATION, <357.00000, 72.00000, 0.00000,1.0>]);
            }
            else if (message == "To Face")
            {
            llSetPrimitiveParams([PRIM_POSITION, <-0.02654, 0.00000, 0.01689>, PRIM_ROTATION, <0.00000, 90.00000, 0.00000,1.0>]);         
            } 
        }
     
        timer()
        {
        //  stop timer
            llSetTimerEvent(0);
     
            llListenRemove(listenHandle);
            llWhisper(0, "Sorry. You snooze; you lose.");
        }
    }

     

×
×
  • Create New...