Jump to content

Ryuhei Chiung

Resident
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Ryuhei Chiung

  1. integer switch=0;
    key name;
    
    default
    {
    state_entry()
    {
        list access_list = ["aviname","","","","",""];
    llWhisper(0,"protcol 5");
    name = llGetOwner();
    }
    
    touch_start(integer total_number)
    {
    if(switch==0)
    {
    switch=1;
    llSensorRepeat("","",AGENT,50,PI,15.0);
    llWhisper(0,"on");
    }
    else if(switch==1) 
    {
    switch=0;
    llSensorRemove();
    llWhisper(0,"off");
    } 
    }
    
    sensor(integer total_number)
    {
    vector pos = llGetPos();
    integer j;
    integer count = total_number;
    for (j = 0; j < count; j++)
    {
        if(llDetectedKey(j) "Diablo Difference","Sharraki","Isaiah Scorpio")
    {
    float diff = llVecDist(pos,llDetectedPos(j));
    integer dist = llRound(diff);
    string result = (llDetectedName(j)) + " " + ((string)dist) + "m"; 
     llDialog(llGetOwner(), "Select option", ["alert"], 10);
     llSensorRepeat("","",AGENT,50,PI,209.0);
    //}
    }
    }
    
    no_sensor()
    {
     llDialog(llGetOwner(), "Select option", ["relax"], 10);
     llSensorRepeat("","",AGENT,50,PI,15.0);
    }
    
    }

     ok so this is the script so far, the only thing that doesnt work and i cant figure out is how to add and access list to the script so the scanner will ignore certain people and not trigger the alert.

    any help is apprechiated :)

  2. ok let me clarify ive been thinking about it again

    so what im trying to do is set up a sensor HUD (HUD1)so if a avatar walks with set distance the sensor puts out a message in chat of /9off

    the message would be going straight to a meter above the avatars head 

    this meter is also controlled by a seperate hud (hud 2) that has a button on it that does the same thing /9off and the meter switches off

     

    so therefore it cannot be scripted as listen to avatar only because it responds to the same command from HUD 2

    any other ideas how i can solve this problem?

  3. integer SomebodyNear = 0;default{state_entry(){llSetTimerEvent(5.0);}timer(){llSensor("",NULL_KEY,AGENT,95,PI);}sensor(integer num_detected){    llWhisper(9, "off"); // Turn off the hud}no_sensor(){    llWhisper(9, "on"); // Turn on the hud}SomebodyNear = 0;}}

     this doesnt seem to work either

    its something to do with the avatar key but really need help to script such a thing

    yes yes i see however the hud responds to

    /9 off in local , and will not respond to other avatars who use the same command so im thinking it has some kind of key specific to the owner how would i script this into what i have

     

    riiight im sure then its set to listen to owner only, im a complete noob at this so thankyou for your help :)

  4. yes thats exactly how it it supposed to work and the script compiles, however the problem is that i cannot get the other hud to hear what the sensor is saying e.g. if i set it to standard channel it will come out Object: /9 off

    i need the script to speak as me , however my scripting is not advanced enough to achieve this yet, i was hoping to have a little help getting the listener to recognise the sensor hud as owner

  5. hi i want to create a script that when placed in a object on my hud will scan for avatars within a set distance if there are any there then the script will issue a command on channel 9 to turn off another hud

    this is what i have so far and it doesnt work

    any help apprechiated

     

    integer SomebodyNear = 0;

    default
    {
    state_entry()
    {
    llSetTimerEvent(5.0);
    }

    timer()
    {
    llSensor("",NULL_KEY,AGENT,100,PI);
    }

    sensor(integer num_detected)
    {
    if (SomebodyNear == 0)
    {
    llWhisper(9, "off"); // Turn off the hud
    llSay(9, "off");
    SomebodyNear = 1;
    }
    }

    no_sensor()
    {
    llWhisper(9, "on"); // Turn on the hud
    SomebodyNear = 0;
    }
    }

  6. hi i want to create a script that when placed in a object on my hud will scan for avatars within a set distance if there are any there then the script will issue a command on channel 9 to turn off another hud

    this is what i have so far and it doesnt work

    any help apprechiated

     

    integer SomebodyNear = 0;

    default
    {
    state_entry()
    {
    llSetTimerEvent(5.0);
    }

    timer()
    {
    llSensor("",NULL_KEY,AGENT,100,PI);
    }

    sensor(integer num_detected)
    {
    if (SomebodyNear == 0)
    {
    llWhisper(9, "off"); // Turn off the hud
    llSay(9, "off");
    SomebodyNear = 1;
    }
    }

    no_sensor()
    {
    llWhisper(9, "on"); // Turn on the hud
    SomebodyNear = 0;
    }
    }

×
×
  • Create New...