Jump to content

Ron Khondji

Resident
  • Posts

    351
  • Joined

  • Last visited

Everything posted by Ron Khondji

  1. Looks like these gloves might include the alpha mask you need. https://marketplace.secondlife.com/p/Full-Perm-Mesh-Unisex-Black-Leather-Gloves/6130088
  2. I was playing around and found 2 'problems'. 1. When on land that is not deeded to a group, the land_groupkey is null. If the hud owner is not wearing a grouptag, the hud_grouptag is also null. This gives a false result when on land that is not group-owned and has 'only group members can rez' option active. The solution to this is to check if the parcel-owner-key and the parcel-group-key are the same. integer CanRez() { integer T; if (llGetOwner() == llList2Key(llGetParcelDetails(llGetPos(),[PARCEL_DETAILS_OWNER]),0)) { // Land owner can allways rez. T = 1; } else if (llGetParcelFlags(llGetPos()) & PARCEL_FLAG_ALLOW_CREATE_OBJECTS) { // Everyone can rez here. T = 1; } else if (llGetParcelFlags(llGetPos()) & PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS) { // Group members can rez here. list parcel_keys = llGetParcelDetails(llGetPos(),[PARCEL_DETAILS_GROUP, PARCEL_DETAILS_OWNER]); if (llList2Key(parcel_keys, 0) == llList2Key(parcel_keys, 1)) { // Land is group-owned key hud_groupkey = llList2Key(llGetObjectDetails(llGetKey(),[OBJECT_GROUP]),0); key land_groupkey = llList2Key(parcel_keys,0); if (hud_groupkey == land_groupkey) { // Hud owner is a group member. T = 1; } } } return T;}default { touch_start(integer total_number) { if (CanRez()) llOwnerSay("You can rez here."); else llOwnerSay("You can not rez here."); }} 2. If the land is group deeded, the owner of the group can rez there. However, if (s)he is not wearing the grouptag, and the parcel is set to 'only group members can rez', the script says (s)he can not rez. I don't know if there's a way around that.
  3. SL is somewhat of a heavy load on any graphics card. In the past I've had something similar with a Nvidia card. First once week or so, then increasingly more. Sometime later (I don;t remember if it was weeks or months) it died completely. By which I mean to say: I'm afraid your graphics card is about to die. :smileysad:
  4. This seems to work: default { touch_start(integer total_number) { key groupkey = llList2Key(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]), 0); list details = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_GROUP]); if (llGetParcelFlags(llGetPos()) & PARCEL_FLAG_ALLOW_CREATE_OBJECTS) { llOwnerSay("CanRez"); } else if (llGetParcelFlags(llGetPos()) & PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS) { if (llList2Key(details,0) == groupkey) { llOwnerSay("CanRez"); } else llOwnerSay("NoRez"); } else llOwnerSay("NoRez"); }}
  5. There's probably a better way to do this, but here is how I (someone with no experience in vehicle scripting) would do it. control(key id, integer level, integer edge) { vector angular_motor; vector linear_motor; // going forward, or stop going forward if(level & CONTROL_FWD) { linear_motor.x = forward_power; } else if(edge & CONTROL_FWD) { linear_motor.x = 0; } // going back, or stop going back if(level & CONTROL_BACK) { linear_motor.x = reverse_power; } else if(edge & CONTROL_BACK) { angular_motor.x = 0; } // going up or stop going up if(level & CONTROL_UP) { linear_motor.z = VERTICAL_THRUST; } else if (edge & CONTROL_UP) { linear_motor.z -= 0; } // going down or stop going down if(level & CONTROL_DOWN) { linear_motor.z = -VERTICAL_THRUST; } else if (edge & CONTROL_DOWN) { linear_motor.z -= 0; } // turning if(level & (CONTROL_RIGHT|CONTROL_ROT_RIGHT)) { angular_motor.x += 25; } if(level & (CONTROL_LEFT|CONTROL_ROT_LEFT)) { angular_motor.x -= 25; } llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor); llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, linear_motor); } //end control
  6. If neither the tea tag nor the green spout prim are root, you could do the following; - name the tea tag prim as "tag", - name the green spout prim as "spout", - put this slightly modified script in the root prim; //////////////////////////////////////////////////////////// [K] Kira Komarov - 2011, License: GPLv3 //// Please see: http://www.gnu.org/licenses/gpl.html //// for legal details, rights of fair usage and //// the disclaimer and warranty conditions. ////////////////////////////////////////////////////////////string SOUND = "db0734c0-9869-4f9a-bc6b-c6da5fb61587";integer o = -1;integer LNtag;integer LNspout;MakeParticles() { //This is the function that actually starts the particle system. llLinkParticleSystem(LNspout, [ //KPSv1.0 PSYS_PART_FLAGS , 0 //Comment out any of the following masks to deactivate them | PSYS_PART_WIND_MASK //Particles are moved by wind | PSYS_PART_INTERP_COLOR_MASK //Colors fade from start to end | PSYS_PART_INTERP_SCALE_MASK //Scale fades from beginning to end | PSYS_PART_FOLLOW_SRC_MASK //Particles follow the emitter | PSYS_PART_FOLLOW_VELOCITY_MASK //Particles are created at the velocity of the emitter ,PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE ,PSYS_SRC_TEXTURE, "2ca57748-4944-de53-b301-8d0efbafb2c6" //UUID of the desired particle texture ,PSYS_PART_MAX_AGE, 2.5 //Lifetime, in seconds, that a particle lasts ,PSYS_SRC_BURST_RATE, 0.15 //How long, in seconds, between each emission ,PSYS_SRC_BURST_PART_COUNT, 1 //Number of particles per emission ,PSYS_SRC_BURST_RADIUS, 2.0 //Radius of emission ,PSYS_SRC_BURST_SPEED_MIN, 0.5 //Minimum speed of an emitted particle ,PSYS_SRC_BURST_SPEED_MAX, 1.0 //Maximum speed of an emitted particle ,PSYS_SRC_ACCEL, <0.0,0.0,0.8> //Acceleration of particles each second ,PSYS_PART_START_COLOR, <1,1,1> //Starting RGB color ,PSYS_PART_END_COLOR, <0.2,0.2,0.2> //Ending RGB color, if INTERP_COLOR_MASK is on ,PSYS_PART_START_ALPHA, 0.5 //Starting transparency, 1 is opaque, 0 is transparent. ,PSYS_PART_END_ALPHA, 0.0 //Ending transparency ,PSYS_PART_START_SCALE, <0.8,0.8,0.0> //Starting particle size ,PSYS_PART_END_SCALE, <4.3,4.3,0.0> //Ending particle size, if INTERP_SCALE_MASK is on ,PSYS_SRC_ANGLE_BEGIN, -.3 //Inner angle for ANGLE patterns ,PSYS_SRC_ANGLE_END, .3 //Outer angle for ANGLE patterns ,PSYS_SRC_OMEGA, <0.0,0.0,0.0> //Rotation of ANGLE patterns, similar to llTargetOmega() ]);} default { state_entry() { integer i = llGetNumberOfPrims(); do { if (llGetLinkName(i) == "tag") LNtag = i; else if (llGetLinkName(i) == "spout") LNspout = i; } while (--i > 0); } touch_start(integer total_number) { if (llDetectedLinkNumber(0) == LNtag) { if(o = ~o) { llStopSound(); llLinkParticleSystem(LNspout, []); return; } llPlaySound(SOUND, 1.0); MakeParticles(); } }} That should work.
  7. A little copy & paste is all it takes. //////////////////////////////////////////////////////////// [K] Kira Komarov - 2011, License: GPLv3 //// Please see: http://www.gnu.org/licenses/gpl.html //// for legal details, rights of fair usage and //// the disclaimer and warranty conditions. ////////////////////////////////////////////////////////////string SOUND = "db0734c0-9869-4f9a-bc6b-c6da5fb61587";integer o = -1;MakeParticles() //This is the function that actually starts the particle system.{ llParticleSystem([ //KPSv1.0 PSYS_PART_FLAGS , 0 //Comment out any of the following masks to deactivate them //| PSYS_PART_BOUNCE_MASK //Bounce on object's z-axis | PSYS_PART_WIND_MASK //Particles are moved by wind | PSYS_PART_INTERP_COLOR_MASK //Colors fade from start to end | PSYS_PART_INTERP_SCALE_MASK //Scale fades from beginning to end | PSYS_PART_FOLLOW_SRC_MASK //Particles follow the emitter | PSYS_PART_FOLLOW_VELOCITY_MASK //Particles are created at the velocity of the emitter //| PSYS_PART_TARGET_POS_MASK //Particles follow the target //| PSYS_PART_EMISSIVE_MASK //Particles are self-lit (glow) //| PSYS_PART_TARGET_LINEAR_MASK //Undocumented--Sends particles in straight line? , //PSYS_SRC_TARGET_KEY , NULL_KEY, //Key of the target for the particles to head towards //This one is particularly finicky, so be careful. //Choose one of these as a pattern: //PSYS_SRC_PATTERN_DROP Particles start at emitter with no velocity //PSYS_SRC_PATTERN_EXPLODE Particles explode from the emitter //PSYS_SRC_PATTERN_ANGLE Particles are emitted in a 2-D angle //PSYS_SRC_PATTERN_ANGLE_CONE Particles are emitted in a 3-D cone //PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY Particles are emitted everywhere except for a 3-D cone PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE ,PSYS_SRC_TEXTURE, "2ca57748-4944-de53-b301-8d0efbafb2c6" //UUID of the desired particle texture ,PSYS_PART_MAX_AGE, 2.5 //Lifetime, in seconds, that a particle lasts ,PSYS_SRC_BURST_RATE, 0.15 //How long, in seconds, between each emission ,PSYS_SRC_BURST_PART_COUNT, 1 //Number of particles per emission ,PSYS_SRC_BURST_RADIUS, 2.0 //Radius of emission ,PSYS_SRC_BURST_SPEED_MIN, 0.5 //Minimum speed of an emitted particle ,PSYS_SRC_BURST_SPEED_MAX, 1.0 //Maximum speed of an emitted particle ,PSYS_SRC_ACCEL, <0.0,0.0,0.8> //Acceleration of particles each second ,PSYS_PART_START_COLOR, <1,1,1> //Starting RGB color ,PSYS_PART_END_COLOR, <0.2,0.2,0.2> //Ending RGB color, if INTERP_COLOR_MASK is on ,PSYS_PART_START_ALPHA, 0.5 //Starting transparency, 1 is opaque, 0 is transparent. ,PSYS_PART_END_ALPHA, 0.0 //Ending transparency ,PSYS_PART_START_SCALE, <0.8,0.8,0.0> //Starting particle size ,PSYS_PART_END_SCALE, <4.3,4.3,0.0> //Ending particle size, if INTERP_SCALE_MASK is on ,PSYS_SRC_ANGLE_BEGIN, -.3 //Inner angle for ANGLE patterns ,PSYS_SRC_ANGLE_END, .3 //Outer angle for ANGLE patterns ,PSYS_SRC_OMEGA, <0.0,0.0,0.0> //Rotation of ANGLE patterns, similar to llTargetOmega() ]);} default{ touch_start(integer total_number) { if(o = ~o) { llStopSound(); llParticleSystem([]); return; } llPlaySound(SOUND, 1.0); MakeParticles(); }}
  8. What you need is llGetOwnerKey(key id). Use it in the attachments listen. Something like: listen(integer Channel, string Name, key Id, string Message) { if (llGetOwnerKey(Id) == llGetOwner()) { etc.
  9. Use a global counter. Pass the first key to the dataserver. After that the dataserver event comes back with the data. Do whatever you want with the data, then, from inside the dataserver event, update the counter and pass the next key. Rince and repeat. For instance: integer count;list keys;default { state_entry() { llRequestAgentData(keys, count); } dataserver(key queryid, string data) { // use data ++count; llRequestAgentData(keys, count); }}
  10. Also, First you change the name to alll lower caps. Then you do: if ( name == "Channel" ). That should be "channel".
  11. I'm guessing here but I think you're reading the channel number from the notecard as a string. In order to use that as a listen channel you need to cast it to an integer first.
  12. Why don't you file a bug report in the Firestorm Jira instead of posting it here. It seems to be a Firestorm problem that's not related to scripting. Although as a SL viewer user I cannot be sure.
  13. I think he might be talking about copybot. Of wich I do not know if it can copy scripts.
  14. You might find out for yourself by adding a couple of strategically placed llGetUsedMemory() and llGetFreeMemory().
  15. This should do it. list dances;integer WHICH;integer TOTAL;integer PERMS;integer INTERVAL = 25; default { state_entry() { integer i; integer j = llGetInventoryNumber(INVENTORY_ANIMATION); for (i = 0; i < j; i++) { dances += llGetInventoryName(INVENTORY_ANIMATION,i); TOTAL++; } } changed(integer what) { if (what & CHANGED_INVENTORY) llResetScript(); } attach(key id) { if (id) llRequestPermissions(id, PERMISSION_TRIGGER_ANIMATION); } timer() { PERMS = llGetPermissions(); if (PERMS & PERMISSION_TRIGGER_ANIMATION) { llStopAnimation(llList2String(dances, WHICH)); WHICH = llCeil(llFrand(TOTAL))-1; llStartAnimation(llList2String(dances, WHICH)); llSetTimerEvent(INTERVAL); } else llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer perm) { PERMS = perm; llSetTimerEvent(1.0); } }
  16. As far as I know that's impossible. There's no way for a script to know which group tag is worn by a avatar. There's only llSameGroup() to check if the worn group tag is the same as the scripts group.
  17. A dialog is build anew every time you do llDialog(). This means you can't remove buttons, you just don't add them. So, in your touch event, you start with emptiing your 'Main' list and then re-fill it under each 'if'. It would also be far more logical if you call llDialog after you fill the button list (Main).
  18. One thing I noticed: there's a 'Limit framerate' under 'Rendering' which you have selected. You could start with un-selecting that.
  19. You could ceate a group. Make that group the owner of the paintings. Then when a painting gets sold the money goes to the group and everybody in the group gets a equal share. I think that would work.
  20. My M17 with NVidia GTX 780M runs the SL viewer at 'ultra' settings and with shadows enabled without any problems. By which I only want to say that the OP's problems probably lie on his machine alone and are not something that can be fixed by creating a Jira issue.
  21. The sittargets are set by script, using llLinkSitTarget(), so you should allready know all the sittargets.
  22. There are still a few user group meetings in world where you can ask a couple of lindens if you're feature requests have any chance of implementation or not. See this wiki page for schedules.
  23. First: You don't need an integer u in the sensor event. Do: ids += [llDetectedKey(i)]; Then, in the listen event, you need to find the index of the name in names and use that same index to get the key from ids. Something like: integer index = llListFindList(names, [msg]);llRegionSayTo(llList2Key(ids, index), "blah blah");
×
×
  • Create New...