Jump to content

TomixDragoon

Resident
  • Posts

    2
  • Joined

  • Last visited

Posts posted by TomixDragoon

  1. Hello, I am Tomix, and I am new to scripting LSL. I was wondering how I would be able to create a touch limit on an Object. The Limit being one, I already have the object playing a sound and increasing a count by one per click, sort of like signing a guestbook.

    vector  color = <0.5, 1.0, 1.0>;
    string  default_text = "//default_text// \n ";
    string  text;
    string sound1 = "sound1"; //uuid or name of item in inventory
    string sound = "sound"; //uuid or name of item in inventory
    
    integer count=0;
     
    default
    {
        state_entry()
        {
            text = default_text;
            llSetText(text, color, 1.5);
            
            llTargetOmega(<0,0,.2>,PI,1.0);
        }
        
        touch_start(integer total_num)
        {
            llTriggerSound(sound1, 2.0);
    
            llTriggerSound(sound, 2.0);
        }
    
        touch_end(integer number)
        {
            count = count + 1;
            text = (string)count + "//new_text// \n";
            llSetText(text, color, 1.5);
        }
    
    }

     

×
×
  • Create New...