Xiija

Resident
  • Content count

    589
  • Joined

  • Last visited

Community Reputation

129 Excellent

About Xiija

  • Rank
    Lotus Eater

Recent Profile Visitors

574 profile views
  1. X,Y,Z maybe wrong on mesh when using Car script

    Also, you may be able to re orient the mesh before uploading? go to object mode and clear or zero rotations, then go to edit mode and re-orient... or something like that? in blender, to center an object's pivot point... obj mode > obj > transform . origin to geometry
  2. loop move objects on the path

    is this a pathfinding path? dunno if this will help, but it's kinda like a keyframe motion thing, ? just adjust stuff and experiment vector next; list path = [ <5.0, 0.0, 0.0>, <5.0, 5.0, 0.0>, <0.0, 5.0, 0.0>, <0.0, 0.0, 0.0> ]; move() { vector base = llGetPos(); integer x; integer len = llGetListLength(path); for(; x < len; ++x) { next = base + llList2Vector(path,x); llNavigateTo( next , [ FORCE_DIRECT_PATH,TRUE ]); llSleep(2.5); } llSetPos( base ); } integer k; default { state_entry() { llCreateCharacter([ CHARACTER_MAX_SPEED, 6, CHARACTER_DESIRED_SPEED, 2.0]); } touch_start(integer total_number) { if( k = !k) llSetTimerEvent(0.5); else llSetTimerEvent(0.0); } timer() { move(); } }
  3. Adjust Glossiness

    if it is just for yourself, you could mebbe do a user function with something like this in it? ( untested snippet) integer new_Gloss = 250; SET_GLOSS() // user func { integer prims = llGetObjectPrimCount( llGetKey() ); integer curr_link; for( curr_link = 1; curr_link <= prims; ++curr_link) // cycle thru prims { integer numOfSides = llGetLinkNumberOfSides( curr_link ); integer curr_face; for(curr_face = 0; curr_face <= numOfSides; ++curr_face) // cycle thru faces per prim { list params = llGetLinkPrimitiveParams( curr_link, [ PRIM_SPECULAR, curr_face ]); string S_texture = llList2String( params,0 ); vector V_repeats = llList2Vector( params,1 ); vector V_offsets = llList2Vector( params,2 ); float F_rotation_in_radians = llList2Float( params,3 ); vector V_color = llList2Vector( params,4 ); integer I_glossiness = llList2Integer( params,5 ); integer I_environment = llList2Integer( params,6 ); I_glossiness = new_Gloss; llSetLinkPrimitiveParamsFast( curr_link, [ PRIM_SPECULAR, curr_face, S_texture, V_repeats, V_offsets, F_rotation_in_radians, V_color, I_glossiness, I_environment ]); } } }
  4. llLoopSound trigger based on speed

    mebbe try something like this... integer moveFlag; // global variable timer() { float current_speed; current_speed = llVecMag(llGetVel()); if(current_speed > 1.0 && moveFlag == 0) // fire only once to use looping { llLoopSound("horsegalloping",1.0); moveFlag = 1; } if(current_speed < 2.0 && moveFlag == 1) // fire only once to stop, not every timer pulse { llStopSound(); moveFlag = 0; } }
  5. need some help with a script

    // god i hate these boards... // @LaurisFashion's code should work fine?... touch_start(integer touchers) { string rezName = llGetLinkName(llDetectedLinkNumber(0)); if(rezName == "box") { llSay(0, "Nothing is here"); } else { if(~llGetInventoryType(rezName)) { llGiveInventory(llDetectedKey(0), rezName); } } }
  6. rotation childprim to point to avatar

    mebbe something kinda like this? ( change child = 2 to whatever link you are rotating...) integer child = 2; vector vPosTarget; vector pos ; default { state_entry() { } on_rez(integer param) { } touch_start(integer num) { pos = llGetPos(); vPosTarget = llDetectedPos(0); llSetLinkPrimitiveParamsFast( child, [ PRIM_ROT_LOCAL , llRotBetween( <1.0, 0.0, 0.0>, llVecNorm( <vPosTarget.x, vPosTarget.y, pos.z> - pos ) ) ]); } }
  7. https://secondlife.com/httprequest/homepage.php

    Cross origin mebbe? since the site seems to redirect to https://secondlife.com/httprequest/homepage.php do you use llRequestSecureURL( ); for your inworld script?
  8. you could add a glow or fullbright to a face... i think particles only affect the prim as a whole?
  9. Timer not working

    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.
  10. Timer not working

    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(); } }
  11. KFM-Rotation between waypoints

    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() { } }
  12. how do I make an object listen to a hud?

    @arton Rotaru ty it's been a weird day heh, works good with HUD sending uuid now
  13. how do I make an object listen to a hud?

    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] ); } }
  14. how do I make an object listen to a hud?

    works for me inworld... are your scripts set to "running" ?