Jump to content

Xiija

Resident
  • Posts

    912
  • Joined

  • Last visited

Everything posted by Xiija

  1. in your listen... if( llGetSubString(message, 0, 1) == "kb") { llSetObjectDesc( llDeleteSubString(message,0,1) ); }
  2. You might also like to play with ... ClickAction
  3. If you aren't writing this, try.... https://community.secondlife.com/forums/forum/312-inworld-employment/
  4. here is my 2 cents... as close as i could get with as little jumpyness as possible for a moving target... ( TRG is set for a test prim of mine, change that for your tests) // MOD of Follow Camera by Ariane Brodie // MODED by Xiija key owner; integer permissions; vector target; string trgName; key TRG; vector TRG_pos; rotation TRG_rot; vector myVec; integer k = 1; cammit() { llSetCameraParams([ CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive---TRUE FALSE ? CAMERA_FOCUS,TRG_pos, CAMERA_BEHINDNESS_ANGLE, 90.0, // (0 to 180) degrees...df 2.0 CAMERA_BEHINDNESS_LAG, 3.0, // (0 to 3) seconds ......df 0.2 CAMERA_DISTANCE, 5.0, // ( 0.5 to 10) meters CAMERA_FOCUS_LAG, 3.0 , // (0 to 3) seconds CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_FOCUS_THRESHOLD, 4.0, // (0 to 4) meters CAMERA_PITCH, 80.0, // (-45 to 80) degrees CAMERA_POSITION, TRG_pos + <-3.5,0.0,2.0>, // region relative position CAMERA_POSITION_LAG, 3.0, // (0 to 3) seconds CAMERA_POSITION_LOCKED,FALSE, // (TRUE or FALSE) CAMERA_POSITION_THRESHOLD, 4.0, // (0 to 4) meters CAMERA_FOCUS_OFFSET, <-4.0,0,0> // <-10,-10,-10> to <10,10,10> meters ]); } default { state_entry() { owner=llGetOwner(); myVec = llGetPos(); TRG = "25bd1856-b55e-0c5a-8783-f4b4b94eeb0b"; llRequestPermissions(llGetOwner(), PERMISSION_CONTROL_CAMERA); } run_time_permissions(integer perm) { permissions = perm; if (PERMISSION_CONTROL_CAMERA) { llClearCameraParams(); llReleaseCamera(owner); llSetCameraParams([CAMERA_ACTIVE, 0]); llSetCameraParams([CAMERA_ACTIVE, TRUE]); llOwnerSay("Tracking TRG: " ); llSetTimerEvent(0.02); } } touch_start(integer total_number) { if( k = !k) { llOwnerSay("Tracking TRG: " ); llSetTimerEvent(0.02); } else { llClearCameraParams(); llReleaseCamera(owner); llSetCameraParams([CAMERA_ACTIVE, 0]); llSetTimerEvent(0.0); llOwnerSay("OFF"); } } timer() { list details = llGetObjectDetails( TRG, ([ OBJECT_POS, OBJECT_ROT ]) ); TRG_pos = llList2Vector( details,0); TRG_rot = llList2Rot( details,1); cammit(); } }
  5. erm, congratz! .. You have found a new bug! apparently, turning on particles turns off texture anim ? mebbe someone else can check it as a work around, just put the particles in another prim and send it a msg?
  6. here is an example, no need for payment. 1. rez a box and put this script in it. integer numberOfColumns = 1; integer numberOfRows = 3; integer currentCellNumber; default { on_rez(integer rez) { if (!llGetAttached() ) llResetScript(); } state_entry() { llSetScale(<0.03, 0.15, 0.15>); llSetObjectName("HUD test 4"); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 1.0, PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 4, "ac6b1c32-509c-eb96-107c-cc378669d8fd", <1.0, 3.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_LINK_TARGET, LINK_THIS, PRIM_COLOR, 4, <0.0, 1.0, 1.0>, 1.0]); llRequestPermissions( llGetOwner(), PERMISSION_ATTACH ); } run_time_permissions( integer vBitPermissions ) { if ( vBitPermissions & PERMISSION_ATTACH ) { llAttachToAvatar( ATTACH_HUD_TOP_CENTER ); llSetPos( <0,0,-0.1>); } else llOwnerSay( "Permission to attach denied" ); } attach(key id) { if (id) { llOwnerSay( "The object is attached. "); llSetPos( <0,0,-0.1>); llReleaseCamera( llGetOwner() ); } else { llOwnerSay( "The object has been detached"); } } touch_start(integer total_number) { integer face = llDetectedTouchFace(0); vector touchST = llDetectedTouchST(0); if (face == -1) llInstantMessage( llGetOwner(), "Sorry, your viewer doesn't support touched faces. Please update it!"); else if (touchST == TOUCH_INVALID_TEXCOORD) llInstantMessage( llGetOwner(),"Sorry, a touch position could not be determined."); else if (face != 4) llInstantMessage( llGetOwner(),"Please touch the front!"); else //we flip vertically and calculate a cell number { currentCellNumber = llFloor(touchST.x*numberOfColumns) + (numberOfRows -llCeil(touchST.y*numberOfRows))*numberOfColumns + 1; } if( currentCellNumber == 1) { llRegionSay( -25,"invis" ); } if( currentCellNumber == 2) { llRegionSay( -25,"vis" ); } if( currentCellNumber == 3) { } } } Then, put this script in the linkset object you want to control... default { state_entry() { llListen(-25, "", "", ""); } listen(integer channel, string name, key id, string message) { if( message == "invis") { llSetLinkAlpha(LINK_THIS, 0.0, ALL_SIDES); } if( message == "vis") { llSetLinkAlpha(LINK_THIS, 1.0, ALL_SIDES); } } } you can take the HUD box and wear/add it, or just click OK to have it auto attach. the first button is "invis" , the second one is "vis"
  7. something mebbe like changing ... PSYS_PART_START_COLOR, <0.180, 0.800, 0.251>, PSYS_PART_END_COLOR, <0.004, 0.000, 0.939>, into PSYS_PART_START_COLOR, <red, green, blue>, PSYS_PART_END_COLOR, <red, green, blue>,
  8. dunno if this helps, but here are some params from a glider? If your problem is between takeoff and at altitude, just make a check for a difference in current alt and starting alt, and then change the parameters when you are in the air? rotation rotAdjust = <0.46390, -0.53366, -0.53366, 0.46390> ; llSetVehicleType(VEHICLE_TYPE_AIRPLANE); llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, rotAdjust ); // weak angular deflection llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0.1); llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 1.0); // strong linear deflection llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 1.0); llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 0.2); // somewhat responsive linear motor llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_TIMESCALE, 0.5); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 20); // somewhat responsive angular motor, but with 3 second decay timescale // llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_TIMESCALE, 0.5); // llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 3); llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_TIMESCALE, 0.25); llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 1.5); // very weak friction llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <1000.0, 1000.0, 1000.0> ); llSetVehicleVectorParam(VEHICLE_ANGULAR_FRICTION_TIMESCALE, <1000.0, 1000.0, 1000.0> ); llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.25); // almost wobbly llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 1.5); // mediocre response // llSetVehicleFloatParam(VEHICLE_BANKING_EFFICIENCY, 0.4); // medium strength // llSetVehicleFloatParam(VEHICLE_BANKING_TIMESCALE, 0.1); // very responsive // llSetVehicleFloatParam(VEHICLE_BANKING_MIX, 0.95); // more banking when moving llSetVehicleFloatParam(VEHICLE_BANKING_EFFICIENCY, 0.4); llSetVehicleFloatParam(VEHICLE_BANKING_TIMESCALE, 0.5); llSetVehicleFloatParam(VEHICLE_BANKING_MIX, 0.75); // hover can be better than sliding along the ground during takeoff and landing // but it only works over the terrain (not objects) //llSetVehicleFloatParam(VEHICLE_HOVER_HEIGHT, 3.0); //llSetVehicleFloatParam(VEHICLE_HOVER_EFFICIENCY, 0.5); //llSetVehicleFloatParam(VEHICLE_HOVER_TIMESCALE, 2.0); //llSetVehicleFlags(VEHICLE_FLAG_HOVER_UP_ONLY); // non-zero buoyancy helps the airplane stay up // set to zero if you don't want this crutch llSetVehicleFloatParam(VEHICLE_BUOYANCY, 0.2); // define these here for convenience later gAngularControls = CONTROL_RIGHT | CONTROL_LEFT | CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT | CONTROL_DOWN | CONTROL_UP; gLinearControls = CONTROL_FWD | CONTROL_BACK; llSetStatus(STATUS_PHYSICS, TRUE);
  9. dunno if this will help, but.... LL media update fix
  10. a small example... integer face = 2; string url = "https://www.youtube.com/watch?v=d8Lq4w7SzPo"; default { state_entry() { llSetLinkMedia( LINK_THIS, face, [ PRIM_MEDIA_CURRENT_URL ,url, PRIM_MEDIA_AUTO_SCALE,TRUE, PRIM_MEDIA_PERMS_INTERACT,0x1, // owner only PRIM_MEDIA_PERMS_CONTROL,0x1, // owner only PRIM_MEDIA_AUTO_PLAY,TRUE ] ); } }
  11. here are 2 ribbon scripts to test with... Lightsabre - ish plasma(){ llParticleSystem( [ PSYS_SRC_PATTERN,PSYS_SRC_PATTERN_ANGLE_CONE, PSYS_SRC_BURST_RADIUS,0, PSYS_SRC_ANGLE_BEGIN,0, PSYS_SRC_ANGLE_END,0, // PSYS_SRC_TARGET_KEY,llGetKey(), PSYS_PART_START_COLOR, <0,0,0>, // <0.3+llFrand(0.3),0.3+llFrand(0.3),0.2+llFrand(0.3)>, PSYS_PART_END_COLOR,<1,1,1>, //<0.3+llFrand(0.3),0.2+llFrand(0.3),0.3+llFrand(0.3)>, PSYS_PART_START_ALPHA,0.7, PSYS_PART_END_ALPHA,0, PSYS_PART_START_GLOW,0.5, PSYS_PART_END_GLOW,0.2, PSYS_PART_BLEND_FUNC_SOURCE,PSYS_PART_BF_SOURCE_COLOR, PSYS_PART_BLEND_FUNC_DEST,PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA, PSYS_PART_START_SCALE,<scale.z, scale.z, 0.0>, // scale.z ... make it fit the lightsabere length PSYS_PART_END_SCALE,<0.01, 0.01, 0.0>, PSYS_SRC_TEXTURE,"b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d", PSYS_SRC_MAX_AGE,0, PSYS_PART_MAX_AGE,2, PSYS_SRC_BURST_RATE,0.02, PSYS_SRC_BURST_PART_COUNT,5, PSYS_SRC_ACCEL,<0.000000,0.000000,0.000000>, PSYS_SRC_OMEGA,<0.000000,0.000000,0.000000>, PSYS_SRC_BURST_SPEED_MIN,0.1, PSYS_SRC_BURST_SPEED_MAX,0.1, PSYS_PART_FLAGS, 0 | PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_RIBBON_MASK ]); } vector scale; default { state_entry() { scale = llGetScale(); plasma(); // turn on when lightsabre is active ... off is ... llParticleSystem( [] ); } } and a less stiff one.... plasma(){ llParticleSystem( [ PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE, PSYS_SRC_BURST_RADIUS,0.5, PSYS_SRC_ANGLE_BEGIN,0, PSYS_SRC_ANGLE_END,3.14159, // PSYS_SRC_TARGET_KEY,llGetOwner(), PSYS_PART_START_COLOR, <0,0,0>, //<0.3+llFrand(0.3),0.3+llFrand(0.3),0.2+llFrand(0.3)>, PSYS_PART_END_COLOR, <1,1,1>, //<0.3+llFrand(0.3),0.2+llFrand(0.3),0.3+llFrand(0.3)>, PSYS_PART_START_ALPHA,0.5, PSYS_PART_END_ALPHA,0, PSYS_PART_START_GLOW,0.3, PSYS_PART_END_GLOW,0.1, PSYS_PART_START_SCALE,<0.9,0.9, 0.0>, PSYS_PART_END_SCALE,<0.25,0.25, 0.0>, PSYS_PART_BLEND_FUNC_SOURCE,PSYS_PART_BF_SOURCE_COLOR, PSYS_PART_BLEND_FUNC_DEST,PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA, PSYS_SRC_TEXTURE, "b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d", // "5748decc-f629-461c-9a36-a35a221fe21f", PSYS_SRC_MAX_AGE,0, PSYS_PART_MAX_AGE, 1.5, PSYS_SRC_BURST_RATE,0.002, PSYS_SRC_BURST_PART_COUNT,25, PSYS_SRC_ACCEL,<0.000000,0.000000,0.000000>, PSYS_SRC_OMEGA,<0.000000,0.000000,0.000000>, PSYS_SRC_BURST_SPEED_MIN,0.01, PSYS_SRC_BURST_SPEED_MAX,0.01, PSYS_PART_FLAGS, 0 | PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | // PSYS_PART_TARGET_POS_MASK | PSYS_PART_RIBBON_MASK ]); } default { state_entry() { plasma(); // llSetTimerEvent(0.5); } timer() { plasma(); } }
  12. mebbe try a ribbon if your texture looks ok with that? some settings like... PSYS_PART_BLEND_FUNC_SOURCE,PSYS_PART_BF_SOURCE_COLOR, PSYS_PART_BLEND_FUNC_DEST,PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA, PSYS_PART_FLAGS, 0 | PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_TARGET_POS_MASK | PSYS_PART_RIBBON_MASK etc ?
  13. a quick example to test with? integer lock = FALSE; integer chan; key owner_key; key toucher_key; string owner; string toucher; integer listener; integer offset = 100; default { attach(key n) { llResetScript(); } on_rez(integer n) { llResetScript(); } state_entry() { chan = 0x80000000 | (integer)("0x"+(string)llGetOwner()); chan += offset ; chan = -chan; owner_key = llGetOwner(); owner = llGetDisplayName( owner_key ); } touch_start(integer total_number) { listener = llListen(chan,"","",""); toucher_key = llDetectedKey(0); toucher = llGetDisplayName( toucher_key ); llOwnerSay("Your tail is being touched by " + toucher ); if( toucher == owner) { llDialog( owner_key,"Change Tail option",["lock","unlock"],chan); } else { llDialog( toucher_key,"Choose an action",["pull","yank"],chan); } } listen(integer channel, string name, key id, string message) { llListenRemove(listener); if( message == "lock") { llOwnerSay(" Locking Tail..." ); // do lock stuff } if( message == "pull") { llSay(0,"\n" + toucher + " yanks " + owner + "'s tail causing " + owner + " to look back at " + toucher + " with an annoyed look." ); } // etc etc } }
  14. dunno if these would help also... http://wiki.secondlife.com/wiki/LlSetHoverHeight http://wiki.secondlife.com/wiki/LlGroundRepel
  15. there is another topic that has some pointers on this ..... kfm and waypoints
  16. dunno if this would help but, mebbe try using a SLPPF call and change some small thing to force an update?
  17. dunno if this helps, but here is an old clock thing with a variable to change the hour... ( this clock is set to SL time (PST) by default ) //////////////////////////////////////////// // Single Prim Clock v2.1 Script // // Written by Xylor Baysklef //////////////////////////////////////////// /////////////// CONSTANTS /////////////////// // These are the faces to show the clock on. integer HOUR_FACE = 4; integer MINUTE_FACE = 0; integer AM_PM_FACE = 2; // Texture type enumeration. integer WHITE_ON_BLACK = 0; integer BLACK_ON_WHITE = 1; integer TRANSPARENT = 2; // This is the type of texture to display. integer DISPLAY_TYPE = WHITE_ON_BLACK; list HOUR_TEXTURES = [ // White on Black "7bc19746-de1b-b84c-9d2a-515d38c030ab", // Black on White "d9b1de36-44d6-c89b-7b7f-97cbc62d47a3", // Transparent "db0b0013-f0b5-70b3-5e40-8685d024a3a2" ]; list MINUTE_TEXTURES = [ // White on Black "9bc9c4bb-8c20-b103-fd5d-60f1072a39b1", // 00-29 "e82c651f-47e9-7950-ea65-f496e1917dd4", // 30-59 // Black on White "7d53ead7-e6a7-59c5-b98b-fe46d9f61818", // 00-29 "6ae5d6a8-a78f-b505-e950-fcb003a480bf", // 30-59 // Transparent "34e55b37-1c59-4a09-38d1-4150ffa396a5", // 00-29 "2b660a82-8d91-c892-a076-45c4a86f0235"];// 30-59 list AM_PM_TEXTURES = [ // White on Black "13c95970-27a7-1a7a-cbc4-0e93f00361ba", // Black on White "b4d9d87e-36f8-7f4f-7d11-b7a2e973053b", // Transparent "f4ca9c46-3a46-6986-eb42-f497e9898d7a" ]; ///////////// END CONSTANTS //////////////// ///////////// GLOBAL VARIABLES /////////////// integer timezone_Offset = 0; // < ********************************** set timezone offset here ************************* /////////// END GLOBAL VARIABLES //////////// UpdateTime() { // Get the time, and split it up into hours and minutes. float Seconds = llGetWallclock(); integer Minutes = llRound(Seconds / 60); integer Hours = Minutes / 60; Hours += timezone_Offset; // < ****************************** changes the hour depending on timezone ****************** // First, lets use this information to set up another // timer event (we do this every minute to eliminate // 'time drift' associated with just a single 60 second // timer event). float SecondsToNextMinute = Minutes * 60 - Seconds + 60; llSetTimerEvent(SecondsToNextMinute); // Now only keep the minutes of the current hour. // (Normalize to 0-59). Minutes %= 60; Hours %= 24; // Calculate if this is AM or PM. integer AM_PM = Hours / 12; // Normalize the hour to 0-11. Hours %= 12; // Calculate the hour grid positions. integer xHourPos = Hours % 4; integer yHourPos = Hours / 4; // Calcualte the minute texture index. integer MinuteTextureIndex = DISPLAY_TYPE * 2 + Minutes / 30; // Normalize the minutes to 0-29. Minutes %= 30; // Calculate the minute grid positions. integer xMinutePos = Minutes % 5; integer yMinutePos = Minutes / 5; // Update the minute texture. key MinuteTexture = llList2Key(MINUTE_TEXTURES, MinuteTextureIndex); llSetTexture(MinuteTexture, MINUTE_FACE); // Now update the offsets to show the current time on the textures. llOffsetTexture(-0.40 + 0.20 * xMinutePos, 0.45 - 0.10 * yMinutePos, MINUTE_FACE); llOffsetTexture(-0.375 + 0.250 * xHourPos, 0.375 - 0.25 * yHourPos, HOUR_FACE); llOffsetTexture(0, 0.250 - 0.50 * AM_PM, AM_PM_FACE); } default { state_entry() { llSetText("", <0.0, 1.0, 0.0>, 1.0); // First set up the correct texture scales, and rotations. llScaleTexture(0.25, 0.25, HOUR_FACE); llScaleTexture(0.20, 0.10, MINUTE_FACE); llScaleTexture(1.00, 0.50, AM_PM_FACE); llRotateTexture(PI_BY_TWO, HOUR_FACE); llRotateTexture(0, MINUTE_FACE); llRotateTexture(-PI_BY_TWO,AM_PM_FACE); // Show the hour and am/pm textures, since they don't change. llSetTexture(llList2Key(HOUR_TEXTURES, DISPLAY_TYPE), HOUR_FACE); llSetTexture(llList2Key(AM_PM_TEXTURES, DISPLAY_TYPE), AM_PM_FACE); // Now just update the time, it will also start the timer. UpdateTime(); } on_rez(integer param) { UpdateTime(); } timer() { // This will show the time, and adjust the timer event. UpdateTime(); } }
  18. I am a lazy coconut , so i'll post the basic slidewalk thing, and you can try and figure out how to make it work for your needs? ... this is set to push an avi in the positive X regional direction... key avi; integer inUse = 0; default { state_entry() { } collision_start(integer num_detected) { if( inUse == 0) { avi = llDetectedKey(0); llPushObject( avi, <50,0,0> , <0,0,0>, FALSE); // llSetTimerEvent(0.2); inUse = 1; } } collision_end(integer num_detected) { llSetTimerEvent(0.0); inUse = 0; } timer() { llPushObject( avi, <50,0,0> , <0,0,0>, FALSE); } }
  19. just change a few things in the script... // define a global integer toggle; // change your listen event a bit listen(integer channel, string name, key id, string message) { if ( message == "light") { toggle = !toggle // change this part ......if (message == "ON") { ..... to ... if ( toggle ) { // llParticleSystem stuff for ON } // change this part ......if (message == "OFF") { ..... to ... else { // llParticleSystem stuff for OFF } } }
  20. 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
  21. 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(); } }
  22. 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 ]); } } }
  23. 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; } }
  24. // 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); } } }
  25. 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 ) ) ]); } }
×
×
  • Create New...