Jump to content

Glovercali

Resident
  • Posts

    19
  • Joined

  • Last visited

Posts posted by Glovercali

  1. Hi Quistess! Thank you for the speedy response!

    The script turned the blinking off but it didn't turn the fullbright off and glow off. How would I implement that in this script?

    Thank you in advance!

     


    integer isOn;
    default
    {
        touch_start(integer num_detected)
        {   
            llSetTimerEvent(0.5*(isOn=!isOn));
        }
        timer()
        { 
            
            integer i = llRound(llFrand(1.5));
            llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_FULLBRIGHT, 2,i, PRIM_GLOW, 2, 0.15*i]);
            i = llRound(llFrand(1.5));
            llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_FULLBRIGHT, 4, i, PRIM_GLOW,4, 0.15*i]);
            i = llRound(llFrand(1.5));
            llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_FULLBRIGHT, 3, i, PRIM_GLOW,3, 0.15*i]);
          
            llSetLinkPrimitiveParamsFast(10,[PRIM_FULLBRIGHT, 2, i, PRIM_GLOW,2, 0.15*i]);
    i = llRound(llFrand(1.5));
            llSetLinkPrimitiveParamsFast(10,[PRIM_FULLBRIGHT, 1, i, PRIM_GLOW,1, 0.15*i]);


        }
    }
        
     

  2. Hello, I am currently in need of some assistance. I have this script here that works great for what I need it to do, which is blink on and off with multiple faces and separate prims. I would like it to turn off and on with a touch, But cant figure out how to do that. 

    they a christmas lights, the blinking is fine they turn on with touch but I of course cannot get them off with touch because I dont know how lol

    here is the script -

     

    default
    {
        touch_start(integer num_detected)
        {
            
            llSetTimerEvent(0.5);
        }

        timer()
        {
            
            integer i = llRound(llFrand(1.5));
            llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_FULLBRIGHT, 2,i, PRIM_GLOW, 2, 0.15*i]);
            i = llRound(llFrand(1.5));
            llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_FULLBRIGHT, 4, i, PRIM_GLOW,4, 0.15*i]);
            i = llRound(llFrand(1.5));
            llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_FULLBRIGHT, 3, i, PRIM_GLOW,3, 0.15*i]);
          
            llSetLinkPrimitiveParamsFast(10,[PRIM_FULLBRIGHT, 2, i, PRIM_GLOW,2, 0.15*i]);
    i = llRound(llFrand(1.5));
            llSetLinkPrimitiveParamsFast(10,[PRIM_FULLBRIGHT, 1, i, PRIM_GLOW,1, 0.15*i]);


        }
    }
      

  3. okay I tried both scripts, both work great!

    Now my issue is when they click the chocolate, it disappears as intended but they click the alpha'd chocolate again and it gives another chocolate. I did add a usages to it which works great, once the uses are all used up, the box stops giving chocolate as intended 

    its just the chocolates will continue to give you more chocolate, even though the prim is alpha'd and its not intended to do so. It will continue until the uses are finished off.

    How do I prevent the alpha'd chocolate prim to stop giving chocolates from inventory, once it has already given one?

  4. Hello!

    I have a box of chocolates

    • root prim is the the box - link 1
    • child prims are ONE kind of chocolate - links 2 - 8
    • last child prim is also the top, which opens to reveal the chocolates - link 9

    So far I've managed to get the top working independently when clicked and the clicked chocolate to give 1 chocolate from box's inventory to avatar.

    My issue is the box. It's the root prim and turns invisible when clicked and give a chocolate. This isn't my intention and not sure how to exclude this from the script I have here.

     

    default

       
    {
        touch_start(integer num_detected)
        {
            key user = llDetectedKey(0);
             
            
             llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN, [PRIM_LINK_TARGET,
             llDetectedLinkNumber(0), PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 0.0]);
             llGiveInventory(user, llGetInventoryName(INVENTORY_OBJECT, 0) );
           
        }
    }

     

    To clarify a bit -

    When you click a chocolate (link 2 - 7 ) it is taken from the box (disappears) then delivers a chocolate from the objects inventory to the avatar's inventory. The chocolate says gone(which is intended) but if you accidently touch the BOX, it disappears as well and also gives a chocolate from inventory.

    Please help! I'm still new to scripting and I sometimes miss things.

  5. Okay, these were all some awesome ideas on how to make my cup more functional. 

    But something else was suggested to me and I thought I would give it a go. Turns out it was a pretty awesome effect and easy too, only issue is I cant seem to get the script to autostart on attach ..I'm still new to scripting so forgive me. 

     

    The script is from outworlds, called the "prim animator"

    Here is a snippet of it in action.

    https://i.gyazo.com/028827a56f36d00f543b4dbe030468cb.mp4

    Gives an awesome effect but to trigger the script, only seems to come from a listener(another script). I'm sure it can be auto-started on attach, As I've seen this a few times before with animation. Only had one script in the cup, not the 2 I seem to be having trouble with.

     

    Can someone guide me on how to auto-start or trigger this script from within itself? Instead of listeners? I'd really appreciate it! 

     

    Thank you so much in advance!

     

     // Prim animation compiler //
    // Fred Beckhusen (Ferd Frederix) - http://www.outworldz.com
    integer playbackchannel = 1; // The default llMessageLinked number
    rotation calcChildRot(rotation rdeltaRot)
    {
        if (llGetAttached())
            return rdeltaRot/llGetLocalRot();
        else
            return rdeltaRot/llGetRootRotation();
    }
    
    vector originalScale = <0.07497, 0.07508, 0.15847>;
     test()
     
     {
        vector currentSize = llGetScale();
        float scaleby = currentSize.x/originalScale.x;
    
         llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, <0.00000, -0.00011, -0.02649>*scaleby, PRIM_ROTATION,calcChildRot(<0.00000, 0.00000, -0.44621, 0.89493>), PRIM_SIZE, <0.06172, 0.06172, 0.09056>*scaleby]);
         llSetLinkPrimitiveParamsFast(3, [PRIM_POSITION, <0.00030, 0.00020, 0.01624>*scaleby, PRIM_ROTATION,calcChildRot(<0.00000, 0.00000, -0.16505, 0.98629>), PRIM_SIZE, <0.05943, 0.05554, 0.01968>*scaleby]);
         llSleep(5.000000);
         llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, <0.00000, -0.00011, -0.02979>*scaleby, PRIM_ROTATION,calcChildRot(<0.00000, 0.00000, -0.03491, 0.99939>), PRIM_SIZE, <0.06172, 0.06172, 0.08397>*scaleby]);
         llSetLinkPrimitiveParamsFast(3, [PRIM_POSITION, <0.00030, 0.00020, 0.00842>*scaleby, PRIM_ROTATION,calcChildRot(<0.00000, 0.00000, -0.18224, 0.98325>), PRIM_SIZE, <0.05943, 0.05554, 0.01968>*scaleby]);
         llSleep(5.000000);
         llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, <0.00000, -0.00011, -0.03174>*scaleby, PRIM_ROTATION,calcChildRot(<0.00000, 0.00000, -0.03491, 0.99939>), PRIM_SIZE, <0.06172, 0.06172, 0.07994>*scaleby]);
         llSetLinkPrimitiveParamsFast(3, [PRIM_POSITION, <0.00030, 0.00020, 0.00586>*scaleby, PRIM_ROTATION,calcChildRot(<0.00000, 0.00000, 0.41469, 0.90996>), PRIM_SIZE, <0.05943, 0.05554, 0.01968>*scaleby]);
     
    }
     
    
    default{
    
         state_entry(){
            llSetMemoryLimit(llGetUsedMemory() + 512);
            }
     
        link_message(integer sender_num, integer num, string message, key id){
            if(num == playbackchannel){
                if(message == "test"){
                    test();
                }
            }
        }
    }

     

  6. I'm not even sure how I can accomplish this but I cant seem to find a good script that would work, that's also modifiable to work with drink animations on a timed interval.

    I just want the drink to appear like its being depleted for RP. Which I understand requires switching textures on one face to another but I don't know how to start it, alpha one texture then un-alpha the next and sync it to animation. While all being on a timer. Can someone help me?

  7. 1 hour ago, Innula Zenovka said:

    It's not completely clear to me how this setup works or where this script is supposed to go.

    If it goes in the HUD, then it should ask for animation permissions in the attach event, when the user first adds it.

    If it goes in the glowy green mandala, then it needs to request permissions in some way, depending on what you want it to do.  If they sit on it, for example, it would go in the changed event (CHANGED_LINK), though there are other ways to trigger the request, of course.

     

     

    Hello :) the script goes in the hud. The hud triggers an animation when you summon a spell on the ground(rez). The mandala rezzes out and its sensor based. So, if someone is standing near the mandala, they get healed through their already scripted combat hud. Mandala does not request permissions to animate. 

    Sorry, hope that clears it up. 

  8. Hello, new to scipting here. 

    I have this hud that rezzes a spell on the ground with a simple animation.

    In example:

    1. Avatar attaches hud

    2. Clicks hud

    3. Places(rezzes) a spell on the floor with squating down animation.

    IT WORKS PERFECTLY FOR ME and other can see me do it.. the issue is when I send to others to test out. 

    This happens..

     2736006683f64f4a1bd75f847080b2fb.png

    Script error - Script trying to trigger animations but PERMISSION_TRIGGER_ANIMATION permission not set.

    This is the code

    rotation relativeRot = <0.0, -0.0, -0.5 , -0.5>;
    
    float floor_distance; //global used for determining individual avatar height
    
    default
    {
        state_entry()
        {
            llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS);
        }
    
        touch_start(integer n)
        {
            //calculate for individual avatar size 
            vector size = llGetAgentSize(llGetOwner());
            floor_distance = size.z / 2;
            
            string Object= llGetInventoryName(INVENTORY_OBJECT,0);
            rotation myRot = llGetRot();
            
            //position is where it rezzes (left,right,height)
            vector position = llGetPos() + (<2, 0.0, -floor_distance> * myRot);
            
            //rotation is how the prims rotation is set relative to avi & rezzer ? 
            rotation rezRot = relativeRot * myRot;
            
            llStartAnimation ( "spell" );
            llRezObject(Object, position, ZERO_VECTOR, rezRot, 0);
                llSleep(3.0);
                llStopAnimation ( "spell" );
        }
    }

    Any suggestion? I have permissions set, animations work for me just fine, but not for others. I did try to add a llResetScript(); but I'm clearly missing something because that didn't work. Maybe I put in the wrong section

×
×
  • Create New...