primerib1 Posted January 23 Share Posted January 23 Okay so I'm making a bag containing items to give. I want the bag to be both rezzable and attachable. It's nicely sized & rotated when rezzed in world. However when it gets attached to the HUD, it's too large. If I can reduce it to, say, 50-60% of the original size, it'll fit the screen much nicer. So I made the following code: on_rez(integer start_param) { llSleep(0.5); // Just in case it doesn't attach instantly llLinksetDataWrite("_attached", (string)llGetAttached()); if ("" == llLinksetDataRead("_large")) llLinksetDataWrite("_large", "1"); llResetScript(); } state_entry() { if (($is_attached = (integer)llLinksetDataRead("_attached"))) { if ("1" == llLinksetDataRead("_large")) { llScaleByFactor(0.6); llLinksetDataWrite("_large", "0"); } llSetLocalRot(HUD_ROT_QUAT); } else { if ("0" == llLinksetDataRead("_large")) { llScaleByFactor(1.66667); llLinksetDataWrite("_large", "1"); } llSetLocalRot(<0, 0, 0, 1>); } Works okay-ish, with a slight delay. But there is one problem: If the bag had been attached as a HUD, then detached, then rezzed on the ground, sure it rotates to upright + return to its full size... But because it was rezzed at 60% scale, the bag then clips the ground. Is there a better way to achieve what I want? Preferably, not clipping the ground when it 'returns' to its full size? Link to comment Share on other sites More sharing options...
Love Zhaoying Posted January 23 Share Posted January 23 Have it make itself go physical, then go non-physical? The only other idea I have is to fix / change the face orientations so that it doesn't need to be rotated for either rez-attach-resize or rez-noattach-resize. Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted January 23 Share Posted January 23 llSetPos(llGetPos() + <0, 0, height>); 1 2 Link to comment Share on other sites More sharing options...
primerib1 Posted January 23 Author Share Posted January 23 2 hours ago, Wulfie Reanimator said: llSetPos(llGetPos() + <0, 0, height>); Oooh good idea! So just let it resize then "shift it jus' a li'l bit" 😁 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now