Jump to content

Quistess Alpha

Resident
  • Posts

    3,764
  • Joined

  • Last visited

Posts posted by Quistess Alpha

  1. 8 hours ago, halwaniwardyandex2 said:

    gRotSwing = llEuler2Rot( <incr * DEG_TO_RAD,0.0,0.0> * llGetRot() );

    That general idea does work, but you will eventually run into floating point rounding problems after extended use of the HUD. I recommend using a list of all desired rotations like in the first script I posted, and using a global variable that stores the index of which rotation the HUD currently has.

  2. 30 minutes ago, Bavid Dailey said:

    I surmise that the linksetdata belongs to the root prim somehow - i.e. the avatar?

    for the purposes of LSD, and probably a lot of other things, the avatar is not the root prim of the attachment. the avatar itself does not store any LSD. I think a better way of thinking of it would be the avatar is kinda like its own region/sim.

    • Like 1
  3. There were some projects to implement VR in SL, but I don't think any are still maintained.

    tl;dr, I'm not an expert, but from what I've heard in passing, adding VR to a game/experience is a lot more involved than just adding support for the hardware, if you want an experience that doesn't make most people dizzy. SL wasn't designed for VR, and good support for it will probably never happen.

    • Thanks 2
  4. 16 hours ago, HorizontalEight said:

    I think i will just have the item say to the avatar how far you are from them.

    touch_start(integer n)
    {   key toucher = llDetectedKey(0);
        vector posToucher = llList2Vector(llGetObjectDetails(toucher,[OBJECT_POS]),0);
        integer distance = llRound( llVecMag(posToucher-llGetPos()) );
        
        llRegionSayTo(toucher,0,(string)distance);
    }

     

    • Like 1
  5. menuChannel wasn't declared as a global variable. Easy enough to fix by adding the line

    integer menuChannel;

    near the top of the script.

    The fundamental issue though is that llGetOwnerSay(); isn't a real function. There are different ways to handle arbitrary text input, but my first choice would be to use llTextBox() on a different channel for each type of expected input. i.e. instead of:

    llOwnerSay("Please type the name you want to add:");

    maybe

    llListenControl(someHandlerForTheChannel,TRUE);
    llTextBox(llGetOwner(),"Please type the name you want to add",menuChannel+1);

    Your changed event is non-sensical, that logic should be part of the listen event.

     

    • Thanks 1
  6. 1 hour ago, halwaniwardyandex2 said:

    Please see the picture to understand what I mean

    That HUD is open source by the way. I don't think it's written in the most clear or best way, but this is the relevant section for what it does when you press those buttons:

        touch_start(integer total_number)    
        {        
            integer link = llDetectedLinkNumber(0);
            integer face = llDetectedTouchFace(0);
            
            if(link == 1)
            {
                if(face == 1||face == 3||face == 5||face == 7)
                {
                    rotation localRot = llList2Rot(llGetLinkPrimitiveParams(link,[PRIM_ROT_LOCAL]),0);        
                    llSetLinkPrimitiveParamsFast(link,[PRIM_ROT_LOCAL,llEuler2Rot(<0.0,0.0,PI/2>)*localRot]);
                }
    
                else
                {
                    rotation localRot = llList2Rot(llGetLinkPrimitiveParams(link,[PRIM_ROT_LOCAL]),0);
                    llSetLinkPrimitiveParamsFast(link,[PRIM_ROT_LOCAL,llEuler2Rot(<0.0,0.0,-PI/2>)*localRot]);
                }
            }
          // script continues. . .

    note that it only works as scripted because the next/previous page buttons are on the root prim. More generally, you'd want to turn the root prim (link number 1) regardless of the link number of the touched button.

  7. 1 hour ago, Rolig Loon said:

    The correct format for llSetLinkPrimitiveParams is llSetLinkPrimitiveParams( integer link, list rules );

    The script in the OP compiles, llSetPrimitiveParams() without 'link' or 'fast' is a valid function, albeit an outdated one that probably ought not be used.

    The main problem I see is in the lines that look like:

    if (llGetLinkName(llDetectedLinkNumber(5)) == "gold")

    In the context of a HUD, 0 is the only sensible argument to llDetectedLinkNumber, because you can't have more than one person simultaneously touch a HUD. It'd also be better to store the value of the function rather than calling it for each conditional, or even better to restructure in a way that doesn't use repeated conditionals:

    (removed identical events to reduce spam)

    // HUD
    integer chan = 15113234731;
    list colors = 
    [   "gold", "rose gold", "silver", "gunmetal" // no final ','
    ];
    
    default
    {    
        touch_start(integer total_number)
        {
            string name = llGetLinkName(llDetectedLinkNumber(0));
            
            if(-1!=llListFindList(colors,[name]))
            {   //the button touched was a color name, send to attachment: 
                // if the object is an attachment that is attached, can be more efficient:
                llRegionSayTo(llGetOwner(),chan,name);
                //llRegionSay(chan,name);
            }
        }
    }

    you can also do similar in the listener using either linkset data or a strided list to associate the name of the color with its color and specular values.

    • Like 2
  8. 2 hours ago, NaomiLocket said:

    Maybe someone here that's big on the opensource scene can vouch for it. Pulsar edit - github

    It's got 30 votes on the AUR but It doesn't seem to be in any major distribution's main package lists, so, on a 1 to 10 "totally obscure use at your own risk" to "NSA secret agents use it" somewhere between 3 and 5.

    Hmm, Debian has a handy page listing all their editor related packages, picking out relevant ones and excluding terminal-only or heavily based on a terminal version (not that terminal programs are bad), the following might be interesting to look into:

    kate, lpe, medit, tea

    • Thanks 1
  9. 18 minutes ago, OdessaDraekavik said:

    Would there be any other way of doing it ?

    Either your object (but not the scripts inside) needs to have next-owner mod-perms, or you're limited to updates which don't change the scripts themselves. Ergo, global variable/linkset data changes or doing most of the 'heavy lifting' of your application on some external web-server.

    Or, perhaps your updater could just rez an updated copy where the old version was and tell the old version to delete itself.

  10. 23 minutes ago, Love Zhaoying said:

    IIRC, only the 16 closest items which meet the sensor criteria, is that still right (if it ever was)?

    Sensors do give you the results ordered by distance, so it would stand to reason so, but I don't know if it's reliable.

    • Thanks 1
  11. A simple example would be something like:

    list gRotations = // rotations to show each face.
    [   < 0.5 ,-0.5 ,-0.5 , 0.5 >, // 0  
        < 0.0 , 0.0 ,-0.71, 0.71>, // 1 
        < 0.0 , 0.0 , 1.0 , 0.0 >, // 2  
        < 0.0 , 0.0 , 0.71, 0.71>, // 3  
        < 0.0 , 0.0 , 0.0 , 1.0 >, // 4
        <-0.5 , 0.5 ,-0.5 , 0.5 >  // 5  
    ];
    default
    {
        touch_start(integer total_number)
        {
            integer link = llDetectedLinkNumber(0);
            string lName = llGetLinkName(link);
            // expect links named '0page', '1page', 2page ... 5page.
            if("page"==llDeleteSubString(lName,0,0))
            {   llSetRot(llList2Rot(gRotations,(integer)lName));
            }
        }
    }

     

    • Like 1
  12. LSL's camera system wasn't designed generally enough to do anything it wasn't specifically intended to do in a visually appealing or 'correct' way.

    While it is technically possible to force it to do what you want, if this is for a personal project, you will have a much better experience if you use your viewer's camera controls to set up a custom camera position. 'precise controls' -> set the 'camera offset' Y value to something relatively large (like 5.0), and play with other values to taste, then save as a preset.

     

    • Thanks 2
  13. 8 hours ago, Wulfie Reanimator said:

    The only thing that's changed since is that visiting other pages of the same domain no longer syncs the URL between viewers.

    I wasn't in SL at the time, but I vaguely remember back when youtube was young, it was a lot easier to have them serve you a raw video file if you asked nicely, which would have made it a lot easier for a SL script to add a front-end which would make it appear a bit more synced than it actually was. Now, basically only places specializing in bad things that start with the letter 'p' (p*** and p*****) serve raw video files that aren't spliced into small segments for easy quality switching, and/or walled behind some layers of DRM.

    • Like 1
  14. It looks like you're trying to make a hud with different 'pages'. When those different pages each have linked buttons on them, it gets rather difficult to script cleanly unless you build your HUD in a specific way. The easiest way to make it work is to have each page of your hud on a different side of a cube, then turn the cube to display each face. Another common solution is to make your HUD like a windmill, but IMO that gets very obnoxious to manipulate (add/remove buttons) in-world.

    • Thanks 1
  15. most viewers come with a "quality and speed" slider that automatically adjusts many other settings that might be a bit fiddly to adjust individually. You probably want it on the faster&low side (left).

    draw distance between 32 and 96 is perfectly usable for most things. I keep mine at 64 even with higher graphics settingss.

    "max number of non-imposters" low can help, or just set "maximum complexity" to its lowest value, which will cause everyone to be clouds until you decide manually to render them (right click -> render fully).

    • Thanks 1
×
×
  • Create New...