Jump to content

Quistess Alpha

Resident
  • Posts

    3,764
  • Joined

  • Last visited

Posts posted by Quistess Alpha

  1. 1 hour ago, alteredblvck said:

    Do you perhaps have any other suggestions? I'm trying to create an AD board for my store.

    you can easily loop in-world sounds up to 30 seconds, and now that 2048 textures are available, you can fit 64 frames of 256x256 video (that sounds small, but an ad-board is probably going to be viewed from far away) (at 16 frames/second, that's 4 seconds, 16 seconds if you cut the quality to 128x128, 32 seconds if you additionally half the framerate) in a single texture. expensive uploads and you'd need to format your files specifically to target SL, but if the video is very short, it might be worth it.

    N.B. If going this rout, the fewer textures your system uses, the more likely they will actually load for people.

    • Like 1
  2. 2 hours ago, Softcakes said:

    touch A and later B in order to unlock C,

    Assuming A,B and C are separate objects, and there may be more than one person interacting with the system at a time, there may be some fiddly bookkeeping involved, but it's certainly not impossible.

    as a hint, to add to a list and remove old avatars who are proabbly no longer relevant, I'd usually use something like a roling buffer:

    if(-1==llListFindList(list_of_avatars,[new_avatar]))
    {   list_of_avatars = llList2List(list_of_avatars+new_avatar,-25,-1); // only remember last 25 avatars.
    }

    (off the top of my head, untested)

  3. 1 hour ago, alteredblvck said:

    I'm not exactly a scripter, just learning the basics. I'd like to loop a youtube video on a prim face. However, when i teleport out and back in, the prim requires being touched to initiate the media again. Is there a way through scripting to automatically start the media on a prim without requiring it to be touched to initialize the media?

    Your script can request that it works how you want it to by specifying PRIM_MEDIA_AUTO_PLAY, TRUE in the media params for that face, but most viewers will laugh in your face and ignore the request. IIRC firestorm has an option somewhere to respect autoplay media if the script has asked for it, but it's off by default.

    You can't really do "nice things" (like deciding when it plays, starting, stopping, looping...) with youtube videos directly, you'd need the raw video file hosted somewhere.

  4. 9 hours ago, Qie Niangao said:

    Dumb question I'm too lazy to check: Is there a Senra child avatar? Could/should there be, all pre-modesty'd and all?

    too lazy to check if anyone else responded, but no, subjectivity being a thing, one could hypothetically style a senra as a teen with the right combination of sliders, outfit, and mannerisms, (which I would say is true of almost all generic mesh bodies) but there is no version of it specifically built for people who wish to present as children. IMHO I'd say there ought to be, if only as a standard example of how the new required features might work (permanent alpha-cuts around the no-no areas seems the easiest to me?)

    • Like 2
    • Thanks 1
  5. 1 hour ago, Nofunawo said:

    a scanner

    What's the 'Zoom' SLURL? I never could figure out a convenient way to tell the viewer to camera-follow a specific object (I.E. automatically ctrl+alt+click an object that may be quickly moving and hard to click manually) , and briefly skimming the specifications again I'm only seeing things that would at best bring up a beacon for a specific position.

  6. 16 hours ago, Love Zhaoying said:

    I kept wanting to bring up the "slam bit", but I am not conversant with the details on it, so am glad you did!

    I'm certainly no expert on it, and it's a pain to test (passing things back/forth between alts and carefully remembering each step of what you're testing) but from my blurry memory of when I tried playing with it years ago, at this point in SL time, slambit seems like a 'mostly fixed' bug. Some specific objects in the library have it, and there might be specific ways of making it happen*, but for the most part, I think it ~should just be a once-in-a-blue-moon bug now.

    *make an in-world (empty) object limited perms, take it to inventory, set it to full perms, embed it in a notecard, pass the notecard to an alt, alt takes the object out of the notecard. That should result in an object that when rezzed loses perms. Makes me kindof curious what would happen if the alt set a different variety of limited perms then passed it back.

    • Thanks 1
  7. 49 minutes ago, Qie Niangao said:
    [secondlife:///app/chat/

    "chat links" (IDK if there's a standard name, but that's what I've always called SLURLs of that form) can be a very powerful tool, but current SL limitations make them very clunky in most practical applications. As I think you pointed out in the comments of your script, llDialog's 512 char limit limits the number you can stuff into a dialog box. I have seen/used at least one product that llRegionSay's the links to the user as an alternative to a llDialog style menu, which works fairly well (as long as you constantly remind that most viewers seem afraid of chat links for some imagined security reason, and require the user to right-click then 'run this command' in order to activate a chat link) except when you want/need to hold a conversation in local chat while using the product.

    IMO a notecard filled with chat links would be a very useful menuing alternative, but alas chat links do not display as clickable in notecards.

    IIRC you can get chat links to work from within media displayed by the in-world web-browser, but at that point, there are better solutions that also work with an external web-browser. Not to mention some people's fear of releasing their IP address via media.

    Chat links can work in your profile to hand out a notecard to people within chat range of your avatar (or some other object you've scripted to listen to the command). I have one in one of my picks.

    • Thanks 2
  8. 1 hour ago, Emma Krokus said:

    If an object is inside a container, then you aren't able to change the properties of things inside your object.

    Even worse, for objects, one ought to have the possibility of "slam bit" in mind. Even assuming an object with empty contents, it is possible for the "inventory asset" of an object, to have permissions that differ from the in-world-rezzed version of that object*. IIRC, you need to do some uncommon things to get that to happen intentionally, but it's still best practice to only change the permissions of objects that are rezzed in-world.

    *The most common case is a full-perm object that when rezzed in-world and then taken back into inventory has more restrictive permissions. Interestingly, such objects can be attached without affecting the permission.

    • Like 1
    • Thanks 2
  9. 1 hour ago, Xiija said:

    so, I can get a good response with postman, or inside SL .. but if I try on replit, or codepen, i'm not getting a response.

    The copy-paste into a new tab test brought up a scary warning about Linden Lab's SSL cert being untrusted. Not an issue you can fix.

  10. The way I would (and have in the past) script this sort of thing with more places than just first place, is to use a global strided list of the form [score, player-UUID, player-name]. To add a new score, search the list for the new UUID, then if the found index is not -1, compare the scores and overwrite if new is greater than old. else, add a new stride to the end of the list, use llListSort* to sort the list, then use llList2List() to clip the list to a fixed length.

    * tangent: until rather recently it was unfeasible to sort a strided list by any stride other than the first, which is why I'd put score first in the stride. llListSortStrided fixes the issue.

    • Like 2
  11. There's a viewer feature to mass change permissions in an object's inventory, Kokua has it and I wouldn't be surprised if it was standard across all tpv's if not the linden viewer.

    "permissions" button in the content tab, then select only the script icon, and change the permissions to what you want, then press the apply button.

    After reading the OP more carefully, I tested using the feature with multiple objects at once, and (maybe surprisingly) it does work on multiple objects if you have them all selected at once, even though the content tab will appear empty when selecting more than one object. shift+click on an object while in edit mode to add or remove it from the list of currently selected objects, then use the permissions adjustment feature the same way as if you had only one object selected.

    mass object permissions.png

    • Like 2
    • Thanks 3
  12. 59 minutes ago, Fenix Eldritch said:

    The demo

    Works surprisingly well, as long as you understand that it points as if it were in the center of your HUD, which may or may not be the effect wanted.

    Not what was asked for, but with that demo, it feels better to me if it points based on the avatar's position&rotation,

    Quote
        timer()
        {
            vector vTarget=llList2Vector(llGetObjectDetails(target,[OBJECT_POS]),0); //target position
            vector vPos=llGetPos(); //our position
            vector fwd = llRot2Fwd(llGetRot());
            vector to_target = vTarget-vPos;
            vector v=to_target; v.z = 0;
            rotation yaw = llRotBetween(fwd,v);
            rotation pitch = llAxisAngle2Rot(<0,-1,0>,llAtan2(to_target.z,llVecMag(v)));
            
            llSetLinkPrimitiveParamsFast(LINK_THIS, [
                PRIM_ROT_LOCAL, (pitch*yaw)
            ]);
        }

     

    • Like 1
  13. Objects on your HUD are in isometric perspective, which means it's impossible to make a 3d HUD that perfectly points at an object and doesn't look a little off, but exaggerating the closeness of the target when it's in front of you seems to work decently:

    key inworld_object = "a10a343b-ec44-cd27-1898-3c15d8f4622b";
    float distance_factor_forwards = 0.1;
    float distance_factor_backwards = 1.0;
    
    rotation rINTRINSIC; // see https://community.secondlife.com/forums/topic/472730-rotations/?do=findComment&comment=2713790 for how to set this value propperly. 
    uLookAt(vector direction, float roll) // to look at a specific position in-world, set direction to (position-llGetPos())
    {   rotation look = // inline YPR2Rot() 
            llAxisAngle2Rot(<1,0,0>, roll) *
            llAxisAngle2Rot(<0,1,0>, 
                -llAtan2(direction.z,llVecMag(<direction.x,direction.y,0>)) )*
            llAxisAngle2Rot(<0,0,1>, llAtan2(direction.y,direction.x) ) ;
            
        llSetLinkPrimitiveParamsFast((llGetNumberOfPrims()>1), // root prim being 0 or 1 is dumb.
        [   PRIM_ROT_LOCAL, (ZERO_ROTATION/rINTRINSIC)*look
        ]);
    }
    
    default
    {
        state_entry()
        {   rINTRINSIC = llEuler2Rot(DEG_TO_RAD*<0,270,0>);
            llSetTimerEvent(1.0);
        }
        timer()
        {   if(llGetPermissions()&PERMISSION_TRACK_CAMERA)
            {   vector pObj = llList2Vector(llGetObjectDetails(inworld_object,[OBJECT_POS]),0);
                vector point_to = llWorldPosToHUD(pObj);
                vector pCam = llGetCameraPos();
                
                point_to.x *= llVecMag(pObj-pCam);
                
                // position results for objects behind the camera are funny.
                if(point_to.x<0)
                {   point_to.z = -point_to.z;
                    point_to.y = -point_to.y;
                    point_to.x *= distance_factor_backwards;
                }else
                {   point_to.x *= distance_factor_forwards;
                }
                
                uLookAt(point_to-llGetLocalPos(), 0.0 );
                
            }else
            {   llRequestPermissions(llGetOwner(),PERMISSION_TRACK_CAMERA);
            }
        }
    }

     

    • Confused 1
  14. Texture animation counts as rotation, right?

    // public domain texture-animation 'tick' script.
    // This script only works correctly when the rotated face has 0 offset and 0 rotation degrees and 1 Horizontal scale and 1 Vertical scale in the build window! (texture animation is buggy.)
    
    integer face = 0; // which face to rotate, or ALL_SIDES
    float degrees = 30.0; // how much to rotate each tick.
    float time = 0.75; // how long to rotate each tick
    float time_tick = 1.0; // how long is each tick in total (time+pause)
    integer tick_max=12; // if non-zero, only do this many ticks.
    
    integer tick=-1;
    
    default
    {   state_entry()
        {   //llSetTexture("571d44bb-8e5f-a579-eaec-cdb0bd109b29",face);
            degrees = DEG_TO_RAD*degrees;
            llSetTimerEvent(time_tick);
            if(tick_max) llSay(0,"Time starts now!");
        }
        timer()
        {   ++tick;
            
            // end condition check:
            if(tick_max && (tick>=tick_max))
            {   llSetTextureAnim( ROTATE, face, 0,0,0,0,0); // SMOOTH bit on causes less smoothness than without it!
                                                            // but having no bits set returns the face back to 0.
                llSetTimerEvent(0.0);
                llSay(0,"Time is up!");
                return;
            }
    
            // do the texture animation:
                // must stop previous anim before starting the next one, or else animation will be instant:
            llSetTextureAnim( ROTATE, face, 0,0,0,0,0); // smooth bit on causes less smoothness than without it!
            llSleep(0.05); // 0.05 should always work, 0.0233 works 75% of ticks or so.
            llSetTextureAnim(ANIM_ON|SMOOTH|ROTATE, face, 0, 0, 
                (tick*degrees) , 
                1+(degrees) ,
                degrees/time);
        }
    }

     

    • Thanks 1
  15. I can confirm I get the same behavior. and for anyone who wants to test, a good texture to use is 571d44bb-8e5f-a579-eaec-cdb0bd109b29 .

    Also non-intuitive, is that non-looping textures obey many of the same spontaneous activation details as non-looping particles. As long as the animation hasn't been stopped, it will activate for anyone who sees it enter their draw distance. So, if you teleport into a region right next to something with a non-looping texture animation, you should see it activate. it will also activate when rezzed from inventory, but not when shift-coppied (because, as mentioned in the wiki, shift-copy removes texture animations from the copy)

    Also it seems you can't do two smooth rotations in a row, you have to stop the previous non-looped animation by calling llSetTextureAnim without the anim_on flag before any subsequent rotation anims will play smoothly rather than just snapping to their final result.

    from a bit of testing, the best way to play a new rotation texture animation after you have already played one, is:

    llSetTextureAnim( ROTATE, face, 0,0,0,0,0); // smooth bit on causes less smoothness than without it!
    llSleep(0.05); // 0.05 should always work, 0.0233 works 75% of ticks or so.
    llSetTextureAnimation(ANIM_ON|SMOOTH|ROTATE, /*new animaiton parameters*/);

     

    • Like 2
  16. 2 minutes ago, Love Zhaoying said:

    They would make less money, if we were "dead". What possible motivation would they have for that?

    The further the people making decisions are from 'the ground' the less perspective they have. It only takes one powerful idiot to ruin everything, if they somehow think that a "small" profit hit now is worth the possibility of greater 'mainstreamness'

    • Like 1
    • Thanks 7
×
×
  • Create New...