Jump to content

Ron Khondji

Resident
  • Posts

    352
  • Joined

  • Last visited

Posts posted by Ron Khondji

  1. Something like this is what you´re looking for:

     

    list colors = [ <0.0, 0.0, 1.0>,  // blue                <1.0, 0.0, 0.0>,  // red                <0.0, 1.0, 0.0>,  // green                <1.0, 1.0, 0.0>   // yellow              ];integer count;default {    touch_end(integer total_number) {        llSetColor(llList2Vector(colors, count), ALL_SIDES);        ++count;        if (count >= llGetListLength(colors)) count = 0;    }}

     

  2. Like this for instance:

    float timeLimit = 15; // Timer reset limit (in seconds). Default: 14400 (4 hours).integer safe;////////////////////////////Particle scripts!/////////////////////// SECTION ONE: APPEARANCE -- These settings affect how each particle LOOKS.integer      glow = TRUE;        // TRUE or FALSE(*)vector startColor = <1,0,0>;     // RGB color, black<0,0,0> to white<1,1,1>(*)vector   endColor = <1,0,0>;     //float  startAlpha = 1.0;         // 0.0 to 1.0(*), lower = more transparentfloat    endAlpha = 1.0;         //vector  startSize = <0.1,0.1,0>; // <0.04,0.04,0>(min) to <10,10,0>(max>, <1,1,0>(*)vector    endSize = <0.1,0.1,0>; // (Z part of vector is discarded)key     texture = "419c3949-3f56-6115-5f1c-1f3aa85a4606";          // Texture used for particles. Texture must be in prim's inventory.// SECTION TWO: FLOW -- These settings affect how Many, how Quickly, and for how Long particles are created.//     Note,integer count = 5;    // Number of particles created per burst, 1(*) to 4096float    rate = 0.1;   // Delay between bursts of new particles, 0.0 to 60, 0.1(*)float     age = 3.0;   // How long each particle lives, 0.1 to 60, 10.0(*)float    life = 2.0;   // When to stop creating new particles. never stops if 0.0(*)// SECTION THREE: PLACEMENT -- Where are new particles created, and what direction are they facing?float      radius = .30;      // 0.0(default) to 64?  Distance from Emitter where new particles are created.float  innerAngle = 0.75;  // "spread", for all ANGLE patterns, 0(default) to PIfloat  outerAngle = 0.0;        // "tilt", for ANGLE patterns,  0(default) to TWO_PI, can use PI_BY_TWO or PI as well.integer   pattern = PSYS_SRC_PATTERN_ANGLE_CONE; // Choose one of the following:// PSYS_SRC_PATTERN_EXPLODE (sends particles in all directions)// PSYS_SRC_PATTERN_DROP  (ignores minSpeed and maxSpeed.  Don't bother with count>1 )// PSYS_SRC_PATTERN_ANGLE_CONE (set innerangle/outerange to make rings/cones of particles)// PSYS_SRC_PATTERN_ANGLE (set innerangle/outerangle to make flat fanshapes of particles)vector      omega = <0,0,0>; // How much to rotate the emitter around the <X,Y,Z> axises. <0,0,0>(*)// Warning, there's no way to RESET the emitter direction once you use Omega!!// You must attach the script to a new prim to clear the effect of omega.// SECTION FOUR: MOVEMENT -- How do the particles move once they're created?integer followSource = FALSE;   // TRUE or FALSE(*), Particles move as the emitter moves, (TRUE disables radius!)integer    followVel = FALSE;    // TRUE or FALSE(*), Particles rotate towards their directioninteger         wind = FALSE;   // TRUE or FALSE(*), Particles get blown away by wind in the siminteger       bounce = FALSE;   // TRUE or FALSE(*), Make particles bounce on Z altitude of emitterfloat       minSpeed = 1.3;     // 0.01 to ? Min speed each particle is spit out at, 1.0(*)float       maxSpeed = 1.5;     // 0.01 to ? Max speed each particle is spit out at, 1.0(*)vector          push = <0,0,-0.6>; // Continuous force pushed on particles, use small settings for long lived particles//key           target = "";      // Select a target for particles to arrive at when they die// can be "self" (emitter), "owner" (you), "" or any prim/persons KEY.// Script variablesinteger flags;list sys;updateParticles(key target){    flags = 0;    if (target == "owner") target = llGetOwner();    if (target == "self") target = llGetKey();    if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;    if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;    if (startColor != endColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;    if (startSize != endSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;    if (wind) flags = flags | PSYS_PART_WIND_MASK;    if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;    if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;    if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;    sys = [  PSYS_PART_MAX_AGE,age,        PSYS_PART_FLAGS,flags,        PSYS_PART_START_COLOR, startColor,        PSYS_PART_END_COLOR, endColor,        PSYS_PART_START_SCALE,startSize,        PSYS_PART_END_SCALE,endSize,        PSYS_SRC_PATTERN, pattern,        PSYS_SRC_BURST_RATE,rate,        PSYS_SRC_ACCEL, push,        PSYS_SRC_BURST_PART_COUNT,count,        PSYS_SRC_BURST_RADIUS,radius,        PSYS_SRC_BURST_SPEED_MIN,minSpeed,        PSYS_SRC_BURST_SPEED_MAX,maxSpeed,        PSYS_SRC_TARGET_KEY,target,        PSYS_SRC_INNERANGLE,innerAngle,        PSYS_SRC_OUTERANGLE,outerAngle,        PSYS_SRC_OMEGA, omega,        PSYS_SRC_MAX_AGE, life,        PSYS_SRC_TEXTURE, texture,        PSYS_PART_START_ALPHA, startAlpha,        PSYS_PART_END_ALPHA, endAlpha            ];    float newrate = rate;    if (newrate == 0.0) newrate=.01;    if ( (age/rate)*count < 4096) llParticleSystem(sys);    else {        llInstantMessage(llGetOwner(),"Your particle system creates too many concurrent particles.");        llInstantMessage(llGetOwner(),"Reduce count or age, or increase rate.");        llParticleSystem( [ ] );    }}default {    state_entry() {        llSetTimerEvent(.1);    }        timer() {        llSetTimerEvent(timeLimit);        safe = TRUE;        if ((integer)llFrand(1000.0) > 500) safe = FALSE;        if (!safe) llSensorRepeat("","",AGENT_BY_LEGACY_NAME,5.0,PI,2.0);        else {
    llSensorRemove();
    llParticleSystem( [] );
    } } sensor(integer total_number) { updateParticles( llDetectedKey(0) ); } no_sensor() { llParticleSystem( [ ] ); }}

     

    • Like 1
  3. This is one way to do what you´re looking for.

    key av;default {    state_entry() {        llSetStatus(STATUS_PHANTOM, FALSE);    }    collision_start(integer total_number) {        if (av != llDetectedKey(0)) {            av = llDetectedKey(0);            llSetTimerEvent(30.0);        }    }        timer() {
    av = ""; vector size = llGetScale(); float max = llListStatistics( LIST_STAT_MAX, [size.x, size.y, size.z] ); llSensor( "", "", AGENT, max, PI); } sensor(integer num) { llSetTimerEvent(1.0); integer i; do { vector size = llGetScale(); vector pos = llGetPos(); vector det_pos = llDetectedPos(i); if ( (det_pos.x > (pos.x - (size.x / 2)) && det_pos.x < (pos.x + (size.x / 2))) && (det_pos.y > (pos.y - (size.y / 2)) && det_pos.y < (pos.y + (size.y / 2))) ) { llSetStatus(STATUS_PHANTOM, TRUE); llSleep(.5); } else { llSetStatus(STATUS_PHANTOM, FALSE); llSetTimerEvent(.0); } } while (++i < num); } no_sensor() { llSetStatus(STATUS_PHANTOM, FALSE); llSetTimerEvent(.0); }}

     

     Editted to fix the little problem Ela spotted.

  4. While testing your script I noticed the movement does not stop if you detach the camera and move it far away from the av. With the camera up close it stopped at about 25 m, then started to jump up and down.
    At least that´s what happened with the Exodus viewer.

  5. No modify means you can look at, but not change anything.

    If the object containing the no modify items itself is modify, then the new owner can move or delete the containg items from the objects inventory.

    In other words; if everything is no modify, then the new owner can change nothing about it.

  6. The id in the first listen is not the same as the id that gets send back from the dialog.

    Either try this:

    listen(integer channel, string name, key id, string message)    {        list data = llParseStringKeepNulls(message, ["|"], []);        message = llList2String(data, 0);        USERID = (key)llList2String(data, 1);        if (channel == secretchannel) {            if (message == "requestecurity")             {                 llSetObjectName("SECURITY MENU");                llDialog(USERID,"\nSECURITY MENU:\n\n* you have 60 seconds to make a choice.\n* issue cmds within chatrange.\n*         if only 1 person nearby they autotargetted.\n* doesnt work on yourself",order_buttons(buttons),secretchannel);                llSetObjectName(housename);              //  llSetTimerEvent(60); ALWAYS LISTENING ANYWAY            }            else if(message == "Eject") {                 USERID = id;                state eject;             }             else if(message == "TP Home") {                 USERID = id;                state tp_home;             }             else if(message == "Unsit") {                 USERID = id;                state unsit; }              else if(message == "Cancel") {                 USERID = id;                state cancel; }             else if(message == "Ban" && id == llGetOwner()) {                 USERID = id;                state ban;            }             else if(message == "Ban" && id != llGetOwner())            {                llSetObjectName("SECURITY");                llSay(0,"sorry this is a owner only function.");                llSetObjectName(housename);                state default;            }        }    }}

     Or use a different listen channel for your dialog.

    (I hope that´ll do it :))

  7. If the target is in the same sim as the prim you could use this little script instead: 

     

    vector Target = <118.0, 112.0, 21.5>; // map coordinates default {    state_entry() {        llSitTarget(<.0, .0, .15>, ZERO_ROTATION);        llSetClickAction(CLICK_ACTION_SIT);    }    changed(integer change) {        if (llAvatarOnSitTarget()) {            vector pos = llGetPos();            llSetRegionPos( Target );            llUnSit(llAvatarOnSitTarget());            llSetRegionPos( pos );        }    }}

     

  8.  

    This one does not have the 10m limit.

     

    float ResetTime = 5.0;vector StartPos;rotation StartRot;default {    state_entry() {        if (StartPos) {            llSetRegionPos(StartPos);            llSetRot(StartRot);        }    }    touch_end(integer total_number) {        StartPos = llGetPos();        StartRot = llGetRot();        state falling;    }}state falling {    state_entry() {        llSetStatus(STATUS_PHYSICS, TRUE);        llSetTimerEvent(ResetTime);    }    timer() {        llSetTimerEvent(.0);        llSetStatus(STATUS_PHYSICS, FALSE);        state default;    }}

     

     

  9. Here is one way to do that:

    float ResetTime = 5.0;vector StartPos;rotation StartRot;default {    touch_end(integer total_number) {        StartPos = llGetPos();        StartRot = llGetRot();        state falling;    }}state falling {    state_entry() {        llSetStatus(STATUS_PHYSICS, TRUE);        llSetTimerEvent(ResetTime);    }    timer() {        llSetTimerEvent(.0);        llSetPrimitiveParams([PRIM_POSITION, StartPos, PRIM_ROTATION, StartRot, PRIM_PHYSICS, FALSE]);        state default;    }}

     

     

  10. I think your viewer lost it´s connection to the servers when you crossed the simborder. 
    Then as the script, that runs in the viewer, wanted to check the permissions it couldn´t find the assetservers and gave the error. Soon after that the viewer noticed it lost the connection and crashed. 

    I might be wrong though.

  11. All objects that are not set to the land owning group will be returned.

    This means that for your objects to stay on the land you must either rezz them with the right group activated, or else you have to set the group maually by clicking on the little spanner behind ´group´ on the general tab of the edit window.

    Do not deed your objects to the group. You no longer own them if you do and, if you forgot to set the next owner permissions just right, you won´t be able to edit them either.

×
×
  • Create New...