Jump to content

TrinityReclusive

Resident
  • Posts

    41
  • Joined

Everything posted by TrinityReclusive

  1. Resolved Site no Longer around
  2. Resolved Estate No Longer Around
  3. Ah that did it. 👍 I was trying to add it in differently, However your way is far easier.. Just so no one else drives it away Smile. As for timer part yes i understand what you are referring to.. That is in the original I was using it as a rez and die object (Ship). When i was making a Rez a boat for other to uses so I just set the die timer to zero and left the timer stuff..Just so it stays alive for my private use. I understand that i can take that timer stuff out and still may do that to make it tighter. Want to thank you for your help it let my stop knocking my head against the wall ..LOL 🤪 Thanks so much your response was well appreciated.
  4. This script works great for what i need just cant seem to make it owner only to use the boat. Can some one fix it plaese.. its giving me a headache.. smile ------------------------------------------------------------------------------------------------------------------- integer effects =0; float forward_power = 25; //Power used to go forward (1 to 30) float reverse_power = -5; //Power ued to go reverse (-1 to -30) float turning_ratio = 1.6; //How sharply the vehicle turns. Less is more sharply. (.1 to 10) string sit_message = "DRIVE"; //Sit message string not_owner_message = "You are not the owner of this vehicle ..."; //Not owner message string drive_anim = "Sit"; float curRot; integer shouldDie = 0; //Anything past this point should only be modfied if you know what you are doing stoppsystem() { llLinkParticleSystem(2, []); } psystem() { llLinkParticleSystem(2, [ PSYS_SRC_PATTERN,PSYS_SRC_PATTERN_EXPLODE, PSYS_SRC_BURST_RADIUS,.3, PSYS_SRC_ANGLE_BEGIN,PI/2, PSYS_SRC_ANGLE_END,PI/2 + 0.1, PSYS_SRC_TARGET_KEY,llGetKey(), PSYS_PART_START_COLOR,<1.000000,1.000000,1.000000>, PSYS_PART_END_COLOR,<1.000000,1.000000,1.000000>, PSYS_PART_START_ALPHA,.7, PSYS_PART_END_ALPHA,0., PSYS_PART_START_GLOW,0, PSYS_PART_END_GLOW,0, PSYS_PART_BLEND_FUNC_SOURCE,PSYS_PART_BF_SOURCE_ALPHA, PSYS_PART_BLEND_FUNC_DEST,PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA, PSYS_PART_START_SCALE,<1.30000,1.00000,0.000000>, PSYS_PART_END_SCALE,<2,2, 0.000000>, PSYS_SRC_TEXTURE,"3a7ea058-e486-4d21-b2e6-8b47462bb45b", PSYS_SRC_MAX_AGE,0, PSYS_PART_MAX_AGE,6, PSYS_SRC_BURST_RATE,0.01, PSYS_SRC_BURST_PART_COUNT,4, PSYS_SRC_ACCEL,<0.000000,0.000000,-1.00000>, PSYS_SRC_OMEGA,<0.000000,0.000000,0.000000>, PSYS_SRC_BURST_SPEED_MIN,0.6, PSYS_SRC_BURST_SPEED_MAX,0.6, PSYS_PART_FLAGS, 0 | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_BOUNCE_MASK | PSYS_PART_EMISSIVE_MASK ]); } setVehicle() { llSetCameraEyeOffset(<-14, 0.0, 3.0>); llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN, [PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_NONE]); llSetVehicleFlags(0); llSetVehicleType(VEHICLE_TYPE_BOAT); llSetVehicleFlags(VEHICLE_FLAG_HOVER_UP_ONLY | VEHICLE_FLAG_HOVER_WATER_ONLY); llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, <.8, .8, 1> ); llSetVehicleFloatParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, 3 ); llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <0, 0, 0>); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_TIMESCALE, 1); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 0.05); llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 1 ); llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 5 ); llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0.15); llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY,.5 ); llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 2.0 ); llSetVehicleFloatParam( VEHICLE_BUOYANCY, 1 ); llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.5 ); llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 3 ); llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0.5 ); llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 10 ); llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5 ); llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 2 ); llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 1 ); llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 0.1 ); llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, .5 ); llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, ZERO_ROTATION ); } string curanim; default { on_rez(integer n) { llResetScript(); } state_entry() { //llSetSitText(sit_message); // forward-back,left-right,updown llSitTarget(<0.9,0.3,3.0>, llEuler2Rot(<0,0,0>) ); llSetCameraEyeOffset(<-10, 0, 3>); llSetCameraAtOffset(<10, 0, 0>); setVehicle(); shouldDie = 0; llSetTimerEvent(60); } changed(integer change) { if (change & CHANGED_LINK) { key agent = llAvatarOnLinkSitTarget(1); if (agent != NULL_KEY) { llSetTimerEvent(0); setVehicle(); stoppsystem(); //llMessageLinked(LINK_ALL_CHILDREN , 0, "start", NULL_KEY); llRequestPermissions(agent, PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS| PERMISSION_CONTROL_CAMERA); //llSetLinkAlpha(2, 0.0, ALL_SIDES); llSetStatus(STATUS_PHYSICS, TRUE); llSleep(.4); shouldDie = 0; } else { //llStopSound(); llSetStatus(STATUS_PHYSICS, FALSE); llSleep(.2); llReleaseControls(); llTargetOmega(<0,0,0>,PI,0); llStopAnimation("swim"); llStopAnimation("tread"); llSetTimerEvent(0); //llSetLinkAlpha(2,1.0, ALL_SIDES); vector r = llRot2Euler(llGetRot()); r.x =0; r.y =0; llSetRot(llEuler2Rot(r)); stoppsystem(); llSetTimerEvent(60); } } } run_time_permissions(integer perm) { if (perm&PERMISSION_TAKE_CONTROLS) { llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_DOWN | CONTROL_UP | CONTROL_RIGHT | CONTROL_LEFT | CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT, TRUE, FALSE); llSetCameraParams([ CAMERA_ACTIVE, 1, // 0=INACTIVE 1=ACTIVE CAMERA_BEHINDNESS_ANGLE, 15.0, // (0 to 180) DEGREES CAMERA_BEHINDNESS_LAG, 1.0, // (0 to 3) SECONDS CAMERA_DISTANCE, 6.0, // ( 0.5 to 10) METERS CAMERA_PITCH, 20.0, // (-45 to 80) DEGREES CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_POSITION_LAG, 0.05, // (0 to 3) SECONDS CAMERA_POSITION_THRESHOLD, 30.0, // (0 to 4) METERS CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_FOCUS_LAG, 0.01 , // (0 to 3) SECONDS CAMERA_FOCUS_THRESHOLD, 0.01, // (0 to 4) METERS CAMERA_FOCUS_OFFSET, <0.0,0.0,0.0> // <-10,-10,-10> to <10,10,10> METERS ]); } if (perm & PERMISSION_TRIGGER_ANIMATION) { //llStartAnimation(drive_anim); } } control(key id, integer level, integer edge) { integer reverse=1; vector angular_motor; //get current speed vector vel = llGetVel(); float speed = llVecMag(vel); integer moving=0; float newRot; //car controls if(level & CONTROL_FWD) { llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <forward_power,0,0>); reverse=1; if (!(edge & CONTROL_FWD)) moving=1; } if(level & CONTROL_BACK) { llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <reverse_power,0,0>); reverse = -1; } if(level & (CONTROL_RIGHT|CONTROL_ROT_RIGHT)) { angular_motor.z -= speed / turning_ratio * reverse; angular_motor.x += 2; newRot = 0.1; } if(level & (CONTROL_LEFT|CONTROL_ROT_LEFT)) { angular_motor.z += speed / turning_ratio * reverse; angular_motor.x -= 2; newRot = -0.1; } if (newRot != curRot) { //curRot = newRot; //llSetLinkPrimitiveParamsFast(3, [PRIM_ROT_LOCAL, llEuler2Rot(<PI/2, PI*(1+curRot), 0>)]); } if (moving>0 && !effects) { effects=1; psystem(); llLoopSound("engine", 0.5); } else if (moving==0 && effects>0) { effects=0; stoppsystem(); } llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor); } //end control timer() { } } //end default _________________________________________________ Thank you..
  5. lol never mind thanks i took out the wrong bracket it works fine now thanks
  6. Changed it to this,,,,, // float forward_power = 1; //Power used to go forward (1 to 30) float reverse_power = -1; //Power ued to go reverse (-1 to -30) float turning_ratio = 5.0; //How sharply the vehicle turns. Less is more sharply. (.1 to 10) string sit_message = "Ride"; //Sit message string not_owner_message = "You are not the owner of this vehicle ..."; //Not owner message //Anything past this point should only be modfied if you know what you are doing default { state_entry() { llSetSitText(sit_message); // forward-back,left-right,updown llSitTarget(<0.2,0,0.45>, ZERO_ROTATION ); llSetCameraEyeOffset(<-12, 0.0, 5.0>); llSetCameraAtOffset(<1.0, 0.0, 2.0>); llPreloadSound("boat_start"); llPreloadSound("boat_run"); llSetVehicleFlags(0); llSetVehicleType(VEHICLE_TYPE_BOAT); llSetVehicleFlags(VEHICLE_FLAG_HOVER_UP_ONLY | VEHICLE_FLAG_HOVER_WATER_ONLY); llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, <1, 1, 1> ); llSetVehicleFloatParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, 2 ); llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <0, 0, 0>); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_TIMESCALE, 1); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 0.05); llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 1 ); llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 5 ); llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0.15); llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY,.5 ); llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 2.0 ); llSetVehicleFloatParam( VEHICLE_BUOYANCY, 1 ); llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.5 ); llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 3 ); llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0.5 ); llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 10 ); llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5 ); llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 2 ); llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 1 ); llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 0.1 ); llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, .5 ); llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, ZERO_ROTATION ); } changed(integer change) { if (change & CHANGED_LINK) { key agent = llAvatarOnSitTarget(); llTriggerSound("boat_start",1); llMessageLinked(LINK_ALL_CHILDREN , 0, "start", NULL_KEY); llSleep(.4); llSetStatus(STATUS_PHYSICS, TRUE); llSleep(.1); llRequestPermissions(agent, PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS); llLoopSound("boat_run",1); } else { llStopSound(); llSetStatus(STATUS_PHYSICS, FALSE); llSleep(.1); llMessageLinked(LINK_ALL_CHILDREN , 0, "stop", NULL_KEY); llSleep(.4); llReleaseControls(); llTargetOmega(<0,0,0>,PI,0); llResetScript(); } } } run_time_permissions(integer perm) { if (perm) { llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_DOWN | CONTROL_UP | CONTROL_RIGHT | CONTROL_LEFT | CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT, TRUE, FALSE); } } control(key id, integer level, integer edge) { integer reverse=1; vector angular_motor; //get current speed vector vel = llGetVel(); float speed = llVecMag(vel); //car controls if(level & CONTROL_FWD) { llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <forward_power,0,0>); reverse=1; } if(level & CONTROL_BACK) { llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <reverse_power,0,0>); reverse = -1; } if(level & (CONTROL_RIGHT|CONTROL_ROT_RIGHT)) { angular_motor.z -= speed / turning_ratio * reverse; angular_motor.x += 15; } if(level & (CONTROL_LEFT|CONTROL_ROT_LEFT)) { angular_motor.z += speed / turning_ratio * reverse; angular_motor.x -= 15; } llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor); } //end control } //end default NOW It says This...
  7. Ok this script works fine just need to make it so anyone can use it.. not just the owner. Not sure how to change that. Please help if you can. // float forward_power = 1; //Power used to go forward (1 to 30) float reverse_power = -1; //Power ued to go reverse (-1 to -30) float turning_ratio = 5.0; //How sharply the vehicle turns. Less is more sharply. (.1 to 10) string sit_message = "Ride"; //Sit message string not_owner_message = "You are not the owner of this vehicle ..."; //Not owner message //Anything past this point should only be modfied if you know what you are doing default { state_entry() { llSetSitText(sit_message); // forward-back,left-right,updown llSitTarget(<0.2,0,0.45>, ZERO_ROTATION ); llSetCameraEyeOffset(<-12, 0.0, 5.0>); llSetCameraAtOffset(<1.0, 0.0, 2.0>); llPreloadSound("boat_start"); llPreloadSound("boat_run"); llSetVehicleFlags(0); llSetVehicleType(VEHICLE_TYPE_BOAT); llSetVehicleFlags(VEHICLE_FLAG_HOVER_UP_ONLY | VEHICLE_FLAG_HOVER_WATER_ONLY); llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, <1, 1, 1> ); llSetVehicleFloatParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, 2 ); llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <0, 0, 0>); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_TIMESCALE, 1); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 0.05); llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 1 ); llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 5 ); llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0.15); llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY,.5 ); llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 2.0 ); llSetVehicleFloatParam( VEHICLE_BUOYANCY, 1 ); llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.5 ); llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 3 ); llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0.5 ); llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 10 ); llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5 ); llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 2 ); llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 1 ); llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 0.1 ); llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, .5 ); llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, ZERO_ROTATION ); } changed(integer change) { if (change & CHANGED_LINK) { key agent = llAvatarOnSitTarget(); if (agent) { if (agent != llGetOwner()) { llSay(0, not_owner_message); llUnSit(agent); llPushObject(agent, <0,0,50>, ZERO_VECTOR, FALSE); } else { llTriggerSound("boat_start",1); llMessageLinked(LINK_ALL_CHILDREN , 0, "start", NULL_KEY); llSleep(.4); llSetStatus(STATUS_PHYSICS, TRUE); llSleep(.1); llRequestPermissions(agent, PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS); llLoopSound("boat_run",1); } } else { llStopSound(); llSetStatus(STATUS_PHYSICS, FALSE); llSleep(.1); llMessageLinked(LINK_ALL_CHILDREN , 0, "stop", NULL_KEY); llSleep(.4); llReleaseControls(); llTargetOmega(<0,0,0>,PI,0); llResetScript(); } } } run_time_permissions(integer perm) { if (perm) { llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_DOWN | CONTROL_UP | CONTROL_RIGHT | CONTROL_LEFT | CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT, TRUE, FALSE); } } control(key id, integer level, integer edge) { integer reverse=1; vector angular_motor; //get current speed vector vel = llGetVel(); float speed = llVecMag(vel); //car controls if(level & CONTROL_FWD) { llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <forward_power,0,0>); reverse=1; } if(level & CONTROL_BACK) { llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <reverse_power,0,0>); reverse = -1; } if(level & (CONTROL_RIGHT|CONTROL_ROT_RIGHT)) { angular_motor.z -= speed / turning_ratio * reverse; angular_motor.x += 15; } if(level & (CONTROL_LEFT|CONTROL_ROT_LEFT)) { angular_motor.z += speed / turning_ratio * reverse; angular_motor.x -= 15; } llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor); } //end control } //end default
  8. Ok i cant seem to get this right so help would be great. I want to trigger the following particle script with a chat command On & Off (channel not important can change latter) default { state_entry() { llParticleSystem( [ PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE, PSYS_SRC_BURST_PART_COUNT,(integer) 4, PSYS_SRC_BURST_RATE,(float) .05, PSYS_PART_MAX_AGE,(float) .6, PSYS_SRC_BURST_SPEED_MIN,(float)1, PSYS_SRC_BURST_SPEED_MAX,(float) 7.0, PSYS_PART_START_SCALE,(vector) <0,.1,0>, PSYS_PART_END_SCALE,(vector) <.04,.5,0>, PSYS_PART_START_COLOR,(vector) <1,0,0>, PSYS_PART_END_COLOR,(vector) <.2,0,0>, PSYS_PART_START_ALPHA,(float)0.5, PSYS_PART_END_ALPHA,(float)0.00, PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK | PSYS_PART_FOLLOW_VELOCITY_MASK | PSYS_PART_FOLLOW_SRC_MASK | PSYS_PART_INTERP_SCALE_MASK ] ); } } The above is the particle i want to trigger on and off with a chat command. I have tried different ways from what i have read but never worked. So i ask the pros here what to add and where to get the above particle to trigger On & Off by chat Command. My Minds is melting but then its 3 am lol Help please if you would be so kind.
  9. Yes thanks works great now just what i was trying to get... much thanks
  10. Ok this is what i been trying to do. I have this script that when it starts it plays a loop sound. When you click it it shuts it off. Ho to add when i click it again to turn it back on. What i want is for the loop sound to be playing when the script first starts and be able to turn it off and on. If this makes any sense. default { state_entry() { llLoopSound("Spinning", 1.0); } touch_start(integer total_number) { llStopSound();// sound stops!! } }
  11. This trigger from my hud works great and plays so all can hear it, but want the sound to loop not just play once. What to add to this so that it does just that. string sound = "Roar"; default { touch_start(integer total_num){ if (llDetectedKey(0)==llGetOwner()){ { llTriggerSound(sound, 1.0); } } }} Thanks for any help i dont want to break my hud lol
  12. Well i got If figure out and works now just great thanks for the input. Have a Great SL Day.
×
×
  • Create New...