Jump to content

Xiija

Resident
  • Posts

    912
  • Joined

  • Last visited

Everything posted by Xiija

  1. Cross origin mebbe? since the site seems to redirect to https://secondlife.com/httprequest/homepage.php do you use llRequestSecureURL( ); for your inworld script?
  2. you could add a glow or fullbright to a face... i think particles only affect the prim as a whole?
  3. There is nothing wrong with my script or yours that i can see, try copying the script and rezzing a new prim to put it in.
  4. Your isday variable is mebbe messin stuff up? dunno... this may work... integer time = 120; //How many seconds between checking Check() { vector sun_dir = llGetSunDirection(); if (sun_dir.z > 0 ) { llSay(0, "It is currently day."); //Do something here for when it is DAY. } else { llSay(0, "It is currently night."); //Do something here for when it is NIGHT. } } default { on_rez(integer start_param) { llResetScript(); } state_entry() { Check(); llSetTimerEvent(time); } touch_start(integer total_number) { Check(); } timer() { Check(); } }
  5. I dunno if this will help ya at all , but just incase... I've been using this for KFM tours for our Burningman events, mebbe something to try? to get the waypoints, I rez a box and put this script in it, then move, rotate and click it.. then I copy the text into my waypoints list and then move to the next waypoint etc... Waypoint finder script default { state_entry() { } touch_start(integer total_number) { vector RC = llGetRegionCorner(); vector mypos = llGetPos(); vector RCregPos = llGetRegionCorner() + mypos; vector vRadBase = llRot2Euler( llGetRot() ); vRadBase *= RAD_TO_DEG; integer Z = (integer)vRadBase.z; llOwnerSay("\n RegionCorner is " + (string)RC + "\nPos is " + (string)mypos ); llOwnerSay("\n \n Waypoint:\n"+ (string)RCregPos + ", < 0.0 , 0.0 , " + (string)Z + " >," ); } } Then i use this script to do the movement... ( i have another script that handles sitting etc) for rotations, i just copy the next waypoint's rotation to the current one? ( makes it rotate in place) i.e. curr waypoint :................................................. <262243.10000, 262133.10000, 23.65183>, < 0.0 , 0.0 , 0 >, curr waypoint with next waypoint's rotation : <262245.10000, 262133.10000, 23.65183>, < 0.0 , 0.0 , -90 >, next waypoint: .................................................<262245.00000, 262125.50000, 23.65183>, < 0.0 , 0.0 , -90 >, Movement Script float Speed = 3.1; // ORIGINAL SPEED 3.1 //#################################################################################################### // DON´T CHANGE ANYTHING BELOW //#################################################################################################### // DATA FOR THE ROUTE A TO B // POSITION ROTATION list Waypoints = [ <262234.10000, 262122.80000, 23.65183>, < 0.0 , 0.0 , 90 >, <262234.10000, 262133.10000, 23.65183>, < 0.0 , 0.0 , 0 >, <262243.10000, 262133.10000, 23.65183>, < 0.0 , 0.0 , 0 >, <262245.20000, 262133.10000, 23.65183>, < 0.0 , 0.0 , -90 >, <262245.00000, 262125.50000, 23.65183>, < 0.0 , 0.0 , -90 >, <262244.40000, 262123.80000, 23.65183>, < 0.0 , 0.0 , -135 >, <262242.70000, 262123.10000, 23.65183>, < 0.0 , 0.0 , 180 >, <262234.10000, 262122.80000, 23.65183>, < 0.0 , 0.0 , 180 >, <262234.10000, 262122.80000, 23.65183>, < 0.0 , 0.0 , 90 > ]; // End //#################################################################################################### // DON´T CHANGE ANYTHING BELOW //#################################################################################################### integer ListLength; integer Start; list Current_route; float Seconds; calculate_tour() { ListLength = llGetListLength(Waypoints); integer Step; float dist; vector v_now = llGetRegionCorner() + llGetPos(); float f_temp = 600; for(Step = 0; Step < ListLength-1; Step = Step+2) { if(llVecDist(v_now, (vector)llList2String(Waypoints,Step)) < f_temp) { f_temp = llVecDist(v_now, (vector)llList2String(Waypoints,Step)); Start = Step; } } if(llList2String(Waypoints,Start+1) == llList2String(Waypoints,Start+3)) Start = Start+2; for(Step = 0; Step < llGetListLength(Waypoints)-1; Step = Step+2) { integer Calc = Start + Step; if(Calc > ListLength-2) Calc = Calc - ListLength; vector v1a;//Position vector v1b = (vector)llList2String(Waypoints,Calc); vector v2a;//Rotation vector v2b = (vector)llList2String(Waypoints,Calc + 1); if(Step == 0) { v1a = llGetRegionCorner() + llGetPos(); v2a = llRot2Euler( llGetRot())* RAD_TO_DEG; } else { integer ido = Calc; if(ido < 0) ido = ido + ListLength; v1a = (vector)llList2String(Waypoints,ido-2); v2a = (vector)llList2String(Waypoints,ido-1); } float distance = llVecDist(v1b, v1a); float seconds = distance / Speed; if(seconds < 0.45) seconds = 0.45; Seconds = Seconds + seconds; vector diff_p = v1b - v1a; vector diff_r = v2b - v2a; Current_route += [diff_p, llEuler2Rot(diff_r* DEG_TO_RAD), seconds]; } Begin(); } Begin() { llSay(0,"\nTour is Departing! \nPlease toggle your AO if sim crossings make you stand\n"); llLoopSound("3573c7a5-5555-65a8-8c1a-63bd1e445a7a",0.1); llSleep( 5 ); Start_driving(); // llSetTimerEvent(0.02); } Start_driving() { llMessageLinked(LINK_SET , 100, "fwd", NULL_KEY); llSetKeyframedMotion(Current_route,[KFM_MODE,KFM_FORWARD]); llSleep(Seconds + 2.0); llSay(0,"\nTour resumes in 2 minutes"); llMessageLinked(LINK_SET , 100, "stopped", NULL_KEY); llSetTimerEvent(0.0); llSleep(BREAK); // llSay(0,"Tour is Departing! \nPlease toggle your AO if sim crossings make you stand"); llResetScript(); // ************* reset this for tour LOOP ************** } float BREAK = 120; // number of minutes to pause at DMV IN SECONDS integer flip = 1; default { on_rez(integer honk) { llResetScript(); } state_entry() { llMessageLinked(LINK_SET , 100, "stopped", NULL_KEY); llSetLinkPrimitiveParamsFast( LINK_ROOT, [PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX, PRIM_LINK_TARGET, LINK_ALL_CHILDREN, PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_NONE]); llSleep(1); llSetKeyframedMotion([],[KFM_COMMAND,KFM_CMD_STOP]); calculate_tour(); } link_message(integer s_link, integer s_chan, string s_msg, key id) { if(s_chan == 200) { if(s_msg == "start") { Start_driving(); //llSetTimerEvent(0.02); } } } timer() { } }
  6. @arton Rotaru ty it's been a weird day heh, works good with HUD sending uuid now
  7. You could add a product channel offset to help keep all your items on separate channels, and add a lil more security? integer chan_offset = -545; // a unique integer for each hud/product pair? MyOwner = llGetOwner(); MyChannel = 0x80000000 | (integer)("0x"+(string)MyOwner); // the basic owner-key channel hash .. which anyone can get easily? MyChannel += chan_offset; llListen(MyChannel,"",NULL_KEY,""); I can't comment on sending the UUID from a HUD to a prim... I've been trying it in-world, but I'm having trouble getting it to work (grrr) ***For the receiver, i linked 2 boxes, and put this in the root , then i made 2 more boxes for the HUD and when clicking the child on the HUD ( supposed to be the button, it's name is "2" ) it seems to send okay, but i'm not getting the texture ? prolly something easy i am missing the HUD is sending this... 2,4d304955-2b01-c6c6-f545-c1ae1e618288,0 ( link number, texture uuid string, face number ) RECEIVER prim integer chan_offset = -545; integer MyChannel; key MyOwner; integer face; key txtr; integer linkNum; default { state_entry() { MyOwner = llGetOwner(); MyChannel = 0x80000000 | (integer)("0x"+(string)MyOwner); MyChannel += chan_offset; llListen(MyChannel,"",NULL_KEY,""); llOwnerSay("Channel "+(string)MyChannel); llSetLinkTexture( 2, "4d304955-2b01-c6c6-f545-c1ae1e618288" , 2); } changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } listen(integer channel, string name, key id, string msg) { llOwnerSay("IN \n" + msg + "\n"); list my_list = llParseString2List( msg,[" "],[" "]); string tmp = llDumpList2String( my_list, "\n"); llOwnerSay("Dbug \n" + tmp + "\n"); // DISPLAYS .... 2,4d304955-2b01-c6c6-f545-c1ae1e618288,0 linkNum = llList2Integer( my_list, 0); txtr = llList2String( my_list, 1); // txtr = llList2Key( my_list, 1); *** TXTR NOT WORKING face = llList2Integer( my_list, 2); llOwnerSay("got " + "\nName-linkNum: " + (string)linkNum + "\nTxtr: " + (string)txtr + "\nFace: " + (string)face ); llSetLinkPrimitiveParamsFast( linkNum, [ PRIM_TEXTURE, face,txtr, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0] ); } }
  8. works for me inworld... are your scripts set to "running" ?
  9. I may be way off here but.... It seems the situation is this, Bob, Ted, and Ann come up to the campfire. Bob clicks the fire and gets perms and is animated. Next Ted clicks it, and the perms are evoked for Bob, and given to Ted, who now gets animated. Lastly Ann clicks the fire and now has the script perms and gets animated. When the script tries to stop Bob's animation, he no longer has the script permissions? Mebbe keeping a list of the avi's currently using the fire & re-requesting perms before stopping the anim would work? Also, i have a blank anim i use sometimes for stopping looping anims.. i think it is from MP? "b43c9176-112c-944f-33fa-da2d275a9acf" ... you play it for a moment and then stop it - no more loop Anyhoo, was just a guess, Did i get close...?
  10. https://community.secondlife.com/forums/forum/312-inworld-employment/
  11. Here is a small omega snippet for the OP to test with, mebbe see if Omega is what they are lookin for? ( this assumes a cylinder, flattened and rotated onto its edge) integer k; float rate = 5.0; // initial spin speed float adj = 0.5; // how much to slow down each timer pulse float rand; default { state_entry() { } touch_start(integer total_number) { if( k = !k) { rand = llFrand(3.0) + 1.0; // random time each spin llSetTimerEvent(0.2); } else // turn off / reset { llSetTimerEvent(0.0); llTargetOmega(ZERO_VECTOR, 0, 0); rate = 5.0; } } timer() { llTargetOmega(<0,0,1>*llGetRot(), rate, 0.5); rate -= adj; // slow down each timer pulse if ( rate <= 0.5) { llSetTimerEvent(0.0); llTargetOmega(ZERO_VECTOR, 0, 0); rate = 5.0; return; } llSetTimerEvent(rand); } }
  12. If you will need to get the specific section each wheel has landed on, mebbe change the number of sections from 32 to 36... so your movement can be in 10 degree intervals?.. if it's all visual, you could just use llTargetOmega ? ... http://wiki.secondlife.com/wiki/LlTargetOmega and change the spinrate in a timer event? a pretty ambitious project for someone who is not a scripter
  13. mebbe for the collisions bit... // global var list added = []; // in the script collision_start(integer num) { key give_to = llDetectedKey( 0 ); if (~llListFindList( added ,[ (string)give_to ])) { return; // they already got one! } added += give_to; // else, add them now llSay(0, "Rezzing HUD for " + llKey2Name(give_to) + " using channel " + (string)channel); llRezObject("phone3", llGetPos(), ZERO_VECTOR, ZERO_ROTATION, channel); llRezObject("ss-hud-01we5", llGetPos(), ZERO_VECTOR, ZERO_ROTATION, channel); llRegionSay(channel, "ATTACH|" + (string)give_to); }
  14. Here is an example of using sun direction to change a texture. This particular snippet will only work during the "day". just rez a box, and drop in the script, then touch the box. The number texture is from LL, you can see how using offsets changes it. the list - "nums" ... is a key / value list, ..."1" has an offset value of -0.45 , etc etc vector repeats = <0.05, 1.0, 0.0>; vector offsets = < -0.45, 0.0, 0.0>; integer face = 0; float set; string numbers_Texture = "a93f7b84-8edf-b465-b3c8-207986881d78"; string transparent_Texture = "5c50e129-0b07-3834-0748-f1df74234a65"; list nums = ["1",-0.45,"2",-0.35,"3",-0.25,"4",-0.15,"5",-0.05,"6",0.05,"7",0.15,"8",0.25,"9",0.35,"0",0.45 ]; default { state_entry() { set = llList2Float(nums,1); llSetLinkPrimitiveParams( LINK_THIS, [ PRIM_TEXTURE,face ,transparent_Texture, repeats, < set, 0.0, 0.0>, 0.0 ]); } touch_start(integer total_number) { vector sun = llGetSunDirection(); integer Z = (integer) llFloor( sun.z * 10); string sunZ = (string)Z; llOwnerSay("Sun z is... " + sunZ); integer index = llListFindList(nums, [sunZ]); integer indx = index + 1; set = llList2Float(nums,indx); llSetLinkPrimitiveParams( LINK_THIS, [ PRIM_TEXTURE, face ,numbers_Texture, repeats, < set, 0.0, 0.0>, 0.0 ]); } }
  15. http://wiki.secondlife.com/wiki/LlGetNotecardLine if it's only 5, and if they never change, just hard code them into yer script mebbe?
  16. example snippet, rez a sphere and drop in, then touch? you can make a variable called "dimple" and do.... vector sun = llGetSunDirection(); if (sun.z < 0) {dimple = night_dimple;} and make the SLPPF call .... [PRIM_TYPE , PRIM_TYPE_SPHERE, PRIM_HOLE_CIRCLE, <0,1,0>, 0.0,<0,0,0>, dimple]); vector night_dimple = <0.88, 1.0, 0.0>; vector day_dimple = <0.98, 1.0, 0.0>; default { state_entry() { llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TYPE , PRIM_TYPE_SPHERE, PRIM_HOLE_CIRCLE, <0,1,0>, 0.0,<0,0,0>, day_dimple]); } touch_start(integer total_number) { llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TYPE , PRIM_TYPE_SPHERE, PRIM_HOLE_CIRCLE, <0,1,0>, 0.0,<0,0,0>, night_dimple]); } }
  17. something kinda like.... string itemName = llGetInventoryName(INVENTORY_OBJECT, llFloor( llFrand( randomIndex ) ) );
  18. vector sun = llGetSunDirection(); if (sun.z < 0) {// night}
  19. copy / pasted this... llRequestUserKey works good, llName2Key gives an error... "name not defined within scope" @aditi - Sylveon - secondlife://util.aditi.lindenlab.com/secondlife/Sylveon/131/132/23 on RequestUserKey wiki page.. typo: owner_name_query should be name_key_query
  20. i use a script distributor, i made mine, but you can get one free on MP? https://marketplace.secondlife.com/p/100Distributor-Distribute-delete-scripts-or-others-in-multiprims-objects-FREE-FREE/940227 ::snippet:: key owner; string slaveScript = "LinkBurn 2.6.2" ; SEND() { toGo += slaveScript; integer prims = llGetObjectPrimCount( llGetKey() ); llRegionSayTo( owner,0,"\n \nSlave scripts being sent, please wait ...." + (string) ((prims - 1) * 3) + " seconds.\n" ); integer x; for(x = 2 ; x <= prims ; ++x) { llGiveInventoryList( llGetLinkKey(x), "", toGo); } llRegionSayTo( owner,0,"\n \n*** Slave script sent to " + (string) (prims - 1) + " prims \n \n*** Removing Slave script from MAIN \n" + "\nPlease take linkset into inventory, re-rez, EDIT your linkset, then click the BUILD tab and choose Scripts > set scripts to running, then click this root prim ..." ); llRemoveInventory( slaveScript ); }
  21. change this line... ( copy paste etc ) llOwnerSay("Sit target saved."); to this.... llOwnerSay("Sit target saved.\nPOS: " + (string)gAvPos + "\nROT: " + (string)gAvRot);
  22. i wonder if calling something like llSetPos( llGetPos() + <0,0,0.1>): ...before doing the "Die" would help?
  23. Basically you create a google form, and then link it to a google sheet... so all the form entries go to the sheet. Your http post fills the form and sends it, and you query the sheet when you need info. You can use right click / view page source - on the form to get the entry id#'s. I googled and used youtube to find out how to do it all also... if you need a FREE host for web pages for anything, you can use Github Pages... https://pages.github.com/ ( I used that to test a code page I am building.... https://xiija.github.io/index.html )
×
×
  • Create New...