Jump to content

FPiepe

Resident
  • Posts

    5
  • Joined

  • Last visited

Posts posted by FPiepe

  1. I did it! :D

    list batty = ["? @_@ ? Price check on prune juice, Bob. Price check on prune juice.", "? @_@ ? And Frasier backs up and drop kicks two points!", "? @_@ ? Paging Billy's mommy. Please come to the Lost and Found.", "? @_@ ? There's a three mile traffic jam on the M25.", "? @_@ ? Now, back to you Sally.", "? @_@ ? LUCY!", "? @_@ ? Clean up on aisle 3"];
     
    default
    {
        collision_start(integer num_detected) 
        
        {
        if(llDetectedType(0) & AGENT){
             list randomizedList;
            
            //Randomize the List, and stuff in new variable
            randomizedList = llListRandomize(batty, 0);
            
            //Pull the first item from the randomized list
            llSay(0, llList2String(randomizedList, 0));
        }
    }
    }

     

    In case anyone else needs it. Thank you so much for the head start. :)

  2. I have this now, which works, sensitivity wise, but I know it needs a different command, to show only one random line from the list, and not show the whole list, just in random order:

     

    list batty = ["? @_@ ? Price check on prune juice, Bob. Price check on prune juice.", "? @_@ ? And Frasier backs up and drop kicks two points!", "? @_@ ? Paging Billy's mommy. Please come to the Lost and Found.", "? @_@ ? There's a three mile traffic jam on the M25.", "? @_@ ? Now, back to you Sally.", "? @_@ ? LUCY!", "? @_@ ? Clean up on aisle 3"];
     
    default
    {
        collision_start(integer num_detected) 
        
        {
        if(llDetectedType(0) & AGENT){
            list shuffled = llListRandomize(batty, 1);
            llOwnerSay(llList2CSV(shuffled));
        }
    }
    }

  3. I have the exact opposite problem. I want my bumper to only be triggered by avatars, and not every time it bumps into an object or just walks over uneven ground. 

    This is what I have so far, and it's way too sensitive:

    string card = "batty";
    key linecountid;
    key lineid;
    integer linemax;

    integer random_integer( integer min, integer max )
    {
      return min + (integer)( llFrand( max - min + 1 ) );
    }


    default
    {
        state_entry()
        {
            //get the number of notecard lines
            linecountid = llGetNumberOfNotecardLines(card);
        }

        collision_start(integer num)
        {
            lineid = llGetNotecardLine(card, random_integer(0, linemax));
        }

        dataserver(key id, string data)
        {
            if (id == linecountid)
            {
                linemax = (integer)data - 1;
            }
            else if (id == lineid)
            {
                llSay(0, data);
            }
        }
    }

     

    to make it say random things in chat when someone bumps into me.

     

    I've tried using  if(llDetectedType(0) & AGENT) but then nothing works at all anymore. :(

×
×
  • Create New...