Jump to content

Quistess Alpha

Resident
  • Posts

    3,999
  • Joined

  • Last visited

Everything posted by Quistess Alpha

  1. Yeah what KT said, the magic is in the next few lines: llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_TEXTURE, ALL_SIDES, TEXTURE_BLANK, RATIO_ONE_BY_ONE, ZERO_VECTOR, FLOAT_FALSE, PRIM_TEXTURE, 2, "0b815b79-c8f5-fc98-91fc-e77b53a468e2", RATIO_ONE_BY_ONE, ZERO_VECTOR, FLOAT_FALSE]);
  2. Oh! and if your thing has defined sit targets, it might make sense to use llAvatarOnLinkSitTarget() and llSLPPF(link,[PRIM_SCRIPTED_SIT_ONLY,TRUE]); all links that aren't meant to be sat on. That would mean people would have to manually unsit and re-sit on the spot they want to be on though.
  3. https://wiki.secondlife.com/wiki/LlGetObjectDetails OBJECT_SIT_COUNT seems to have been added rather recently, but admittedly since link numbers don't support negative indexes it's probably no more efficient than numberOfPrims-objectPrimCount
  4. The second MP result for 'ear wing' looks awfully similar: https://marketplace.secondlife.com/p/Swallow-Ear-Wings-GOLD-HUD/6692859
  5. I might be interested, depending on some specifics of the position. (I.e. times that would be probable for "short notice", the kinds of products, the pay, etc. etc.) What is your preferred means of contact?
  6. There is no support in Secondlife for 'hierarchies' of linked objects. Either everything is sepparate in the same object, or you have different objects, so the second you link the top and bottom of the phone, you no longer have a 'top part' and a 'bottom part', just one phone. It's still ~possible to move multiple linked parts together as one piece, but you need to do the math yourself, and it doesn't always look the best visually.
  7. That wiki page seems to be broken as well https://wiki.secondlife.com/wiki/Template:LSL_Constants/Vehicle Although, looking closely at that source, the problem seems to be something related to: which is present in the invisible entries.
  8. Constants are missing in some of the vehicle function pages. Is this just me?
  9. Sounds fairly simple, but I don't do alcohol, drugs, or graphic violence. I don't see why in the world you'd need an external database, just script memory should be fine, or if you really don't trust your bar's patrons, an experience KVP to sync data to.
  10. I could be remembering wrong, but I thought rotations were reported fairly accurately for avatars in mouselook.
  11. can file a jira feature request. . . not that I'd expect much from it 🤷‍♀️
  12. The 'obvious' workaround is to set the object non-physical before doing the child prim rotation, and set it back to physical afterwards*, although that's playing with fire a bit, and not something I'd recommend a novice scripter try and debug. *I would either try to do it as all one llSLPPF call, or failing that, add a short sleep (or use the non-fast llSLPP ) after the call to turn non-physical, and increase the interval on the timer (sensor in the OP) accordingly.
  13. When I think 'box' I generally imagine an 'axis-aligned parallelapiped' rather than a cube, which would be more like integer vectorInBox(vector pos, boxMin,boxMax) { return (pos.x>boxMin.x) && (pos.y>boxMin.y) &&(pos.z>boxMin.z) && (pos.x<boxMax.x) && (pos.y<boxMax.y) &&(pos.z<boxMax.z); } depends on the semantics and the use case though. We can also optimize this if we wanted to. . . integer vectorInBox(vector pos, boxMin,boxMax) { if(pos.x<boxMin.x) return FALSE; if(pos.y<boxMin.y) return FALSE; if(pos.z<boxMin.z) return FALSE; if(pos.x>boxMax.x) return FALSE; if(pos.y>boxMax.y) return FALSE; if(pos.z>boxMax.z) return FALSE; return TRUE; }
  14. It's not really clear from the code example what you're trying to do, but I suspect this segment may be getting interpreted with the wrong order of operations. Try parenthesizing
  15. there was a discussion in the scripts group recently where people did some basic tests using long variable names (integer aaaaaaaaaaaaaaaaaa... = 7; ) and they seemed to find that llGetFreeMemory decreased for sufficiently long variable names compared to shorter ones. I wouldn't be surprised if constants also saved a byte or two, especially for strings and keys. OTOH, I vaguely recall reading somewhere that it used to be common practice (i.e for LSO scripts) to set key/string constants to (user defined) global variables if they were used a lot in the script. (i.e. gDEF_TEXT= TEXTURE_DEFAULT;)
  16. Come Josephine in my flying machine: http://www.library.ucsb.edu/OBJID/Cylinder1943 also. . . among a few other hours of browsing the archives. . . https://cylinders.library.ucsb.edu/search.php?queryType=@attr+1=1020&num=1&start=1&query=cylinder8015
  17. I.E. key thing = llDetectedKey(n); // for example. if(llGetOwnerKey(thing)!=thing) { // is an object, and is in same region, (or the key was not a valid key) /* if(thing) { // gratuitous check that thing was actually a valid key, probably unneccessary. }else { // thing wasn't actually a key, probably a scripting error. } */ }else if(llGetAgentSize(thing)) { // is an avatar, and is in the same region. }else { // is not in the same region. } If I'm reading the caveats correctly, then if(llList2Integer(llGetObjectDetails(thing,[OBJECT_BODY_SHAPE_TYPE]),0)==-1) { // (assuming a valid key) thing is an object and may or may not be in the current region. // or possibly an avatar shouting from over 34 feet on the other side of the region border. } // alternatively if(llList2Key(llGetObjectDetails(thing,[OBJECT_CREATOR]),0)) { // (assuming a valid key) thing is an object and may or may not be in the current region. // or possibly an avatar shouting from over 34 feet on the other side of the region border. }
  18. Kinda too trivial to try and extort money from you for . . . Turn things invisible 'hud' : default { touch_end(integer i) { llSay(-27,"Invis"); } } Script in things that go invisible: integer visable=TRUE; default { state_entry() { llListen(-27,"","","Invis"); } listen(integer c, string name, key who, string text) { llSetLinkAlpha(LINK_SET,visable=!visable,ALL_SIDES); } } Pay me: default { touch_end(integer i) { llSay(0,"[secondlife:///app/agent/8645873d-1306-4f22-a60c-4f2bc3bb9ca2/pay Click to pay me L$]"); } }
  19. Huh, it works fine for me, if you'll pardon the spam: default { state_entry() { llSetRot(<0,0.71,0,0.71>); // 90 degree turn on y-axis llParticleSystem( [ PSYS_PART_FLAGS, //PSYS_PART_BOUNCE_MASK| // particles 'bounce' when falling down to the z=0; plane relative to root. //PSYS_PART_EMISSIVE_MASK| // fullbright particles //PSYS_PART_FOLLOW_SRC_MASK| //follow source, but disable burst radius. //PSYS_PART_FOLLOW_VELOCITY_MASK | // particles point their 'up' towards their heading. PSYS_PART_INTERP_COLOR_MASK | //color and alpha change over the particle's lifetime. PSYS_PART_INTERP_SCALE_MASK| //particle size/scale changes over the particle's lifetime. PSYS_PART_RIBBON_MASK | //PSYS_PART_TARGET_LINEAR_MASK | // straight line between src and target. //PSYS_PART_TARGET_POS_MASK | // particles attracted to target. //PSYS_PART_WIND_MASK | 0, // makes (un)commenting easier. /*------------------------------------------------------------------------------------*/ //System Presentation PSYS_SRC_PATTERN, //chose one of the following //PSYS_SRC_PATTERN_EXPLODE, //PSYS_SRC_PATTERN_ANGLE_CONE, //PSYS_SRC_PATTERN_ANGLE , PSYS_SRC_PATTERN_DROP , //PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY, // questionable implementation. PSYS_SRC_BURST_RADIUS, 0.05, // float value PSYS_SRC_ANGLE_BEGIN, 0.0,// range 0 to PI PSYS_SRC_ANGLE_END, 0.0, // range 0 to PI. //PSYS_SRC_TARGET_KEY, //llGetKey(), // Key of the Target object. /*------------------------------------------------------------------------------------*/ //Particle Appearance PSYS_PART_START_COLOR, <1.0, 0.25, 0.5>, PSYS_PART_END_COLOR, <1.0, 1.0, 1.0>, PSYS_PART_START_ALPHA, 1.0, // 1.0 - 0.0 ; opaque to transparent. PSYS_PART_END_ALPHA, 1.0, PSYS_PART_START_SCALE, <0.75, 0.75, 0.0>, // z is ignored. PSYS_PART_END_SCALE, <0.75, 0.75, 0.0>, // z is ignored. PSYS_SRC_TEXTURE, TEXTURE_BLANK, // texture must be a UUID or in the emitter prim's inventory. PSYS_PART_START_GLOW, 0.02, // range 0.0 to 1.0 PSYS_PART_END_GLOW, 0.00, /*------------------------------------------------------------------------------------*/ //Particle Flow PSYS_SRC_MAX_AGE, 0.0, // how long to have the emitter on. PSYS_PART_MAX_AGE, 2.0, // range 0.0 to 30.0 PSYS_SRC_BURST_RATE, 0.017, // 0.0 to inf. Ammount of time between particle bursts. PSYS_SRC_BURST_PART_COUNT, 1, // number of particles per burst (an integer) /*------------------------------------------------------------------------------------*/ //Particle Motion PSYS_SRC_ACCEL, <0.0, 0.0, -0.4>, PSYS_SRC_OMEGA, <0, 0, 0>, // rotation of emiter around X,Y,Z REGIONAL axes. approximately radians per burst. PSYS_SRC_BURST_SPEED_MIN, 0.0, // initial speed of particle. PSYS_SRC_BURST_SPEED_MAX,0.0// no final comma. ]); //llParticleSystem([]); //llTargetOmega(<0,0,1>,0,1.00); } }
  20. IIRC the ribbon is aligned to the z-axis of the emitter. Try rotating the prim itself 90 degrees along the x or y axis.
  21. If anyone else has an issue running the binary for their viewer ( I tested with Firestotm and Kokua) on (arch) linux, after doing a system update, the solution for me was to install the 'libxcrypt-compat' package.
  22. I like this a lot! but be careful with thinking of llDeleteSubstring and llGetSubstring as interchangeable. It would be silly to try and trim off 0 decimal places to leave it at the default 6, but for the sake of maximum generality I think it'd be better to use: llGetSubString((string)f,0,places-7); In general, if returning the string unchanged is a reasonable thing to do for some input, should try llGetSubstring, if returning nothing is reasonable for some input, try llDeleteSubstring. (also similarly for the analogous list functions)
  23. string float_2_string(float f, integer precision) { f*= precision*10; f = llRound(f); f/= precision*10; string s_float = (string)f; integer index = llSubStringIndex(s_float,"."); return llGetSubString(s_float,0,index+precision); } (untested off the top of my head) Edit: checked 'FormatFecimal' link above, and it made clear you should replace "precision*10" with "llPow(10,precision)". The specifications of the two functions differ in that this one expects 'precision' to be the 'number of decimal places' whereas FormatDecimal 'precision' specifies the number of significant figures.
  24. lol, no need to butter me up that much, I'd be happy to help debug and refine it a bit more, but I'm not sure if the forums aren't the best medium for an in-depth back and forth on specific issues. Perhaps we could pick a time to meet in-world, and I'd be more than happy to trade for some .anim files, especially if you have a non-looped 'static pose' that doesn't move many bones. (The anim project is a bit on my backburner though. So many ideas and it's hard to focus on more than one thing at once)
×
×
  • Create New...