Jump to content

Lash Carver

Resident
  • Posts

    39
  • Joined

  • Last visited

Everything posted by Lash Carver

  1. Can you tell whats wrong with it though? when I walk around the person it seems to rotate the wrong directions... can't figure it out... I did think about multiple people, will have to add that later, right now I'd settle for one.
  2. Kinda... This is what I have sofar and the calculation still isn't quite correct... sensor(integer num_detected){ string agentName = llDetectedName(0); vector agentPosition = llDetectedPos(0); rotation agentRotation = llDetectedRot(0); vector ownPosition = llGetPos(); if (llGetAgentInfo(llDetectedKey(0)) & AGENT_MOUSELOOK) { if (m == FALSE) { float pos = llVecDist(ownPosition,agentPosition); if (llVecDist(ownPosition, agentPosition+llRot2Fwd(agentRotation)*pos) < 1.5) { name = agentName; dist = llRound(pos); } list MyRot = llGetObjectDetails(llGetOwner(),[OBJECT_ROT]); llLookAt(agentPosition*llList2Rot(MyRot,0),1,0); //his position times my rotation } So when somebody is aiming within 1.5 of me, it begins to rotate and attempt to point at them according to my current rotation.
  3. Thanks for the info. I have two guns that have this in the ammo hud. It's a big invisible circle with a small arrow. It looks like the circle rotates in the direction of the person who is aiming at me. I am not trying to detect the llCastRay but more so using the llDetectedPos and llDetectedRot to figure it out somehow...
  4. Can anybody point me in the right direction (no pun intended) for finding how people are able to show what DIRECTION somebody is aiming at them from? So to be clear, I need some kind of indicator that points to the nearest person who happens to be aiming at me. I found a script to tell me who is aiming at me but how do I know what direction they are in? I looked into llLookAt which seems to act similar to what I need but seems somehow... off. I know I've seen huds which show perfectly, just not sure if it's some complicated calculation or something i'm missing. Thanks in advance!
  5. I'm using Firestorm and I just joined a group and would like to be able to tell them apart from everybody else in chat and on radar. I've been right clicking and saving to contact set but for 200+ members it's a bit tough... how can I add the whole group or colorize them all somehow?
  6. ugh ok no idea where to even start looking at the lab. The signs point into the ground, the map shows a completely different layout...etc. Where is an example script?! EDIT: Nevermind, thanks for the surl! lol perfect they are definitly smooth!
  7. Yeah it's still very early but I was hoping to get the basic movement working, then work on cleaning stuff up a bit. Thanks for all the continued help! I recreated my vehicle linkset and it's magically working now. Really not sure what broke my other build.
  8. It will not turn, at all, ever. I have checked and the controls are firing and the angular is changing as expected, just nothing happens. I ust found something interesting though! My vehicle is only 3 prims and this one script. Just to test, I made a block of wood and put my script inside and ta-da! works perfect. Whats wrong with my linkset!?
  9. I know about the time, since it's auto-capped, it's just "as fast as possible". I just can't figure out why it works PERFECTLY on everything except turning...
  10. OMG thank you! geez I spent hours looking it over and couldn't get it lol. EDIT: Crap still not working! (no change)
  11. key OwnerKey; string OwnerName; key Sitter= NULL_KEY; key Driver = NULL_KEY; string Anim = "crouch"; vector Linear; vector Angular; float FlightForwardPower = 24; float FlightReversePower = 16; float FlightUpPower = 14; float FlightDownPower = 14; float FlightStrafePower = 12; float FlightTurnPower = 7; default { state_entry() { OwnerKey = llGetOwner(); OwnerName = llKey2Name(OwnerKey); llSetSitText("-FLY-"); llCollisionSound("", 0.0); llSitTarget(<0.8,0.0,0.65>, llEuler2Rot(<0,0,0> )); llSetBuoyancy(0); } changed(integer change) { if((change & CHANGED_LINK) == CHANGED_LINK) { Sitter = llAvatarOnSitTarget(); if (Driver != NULL_KEY) {llUnSit(Sitter); return;} if (Sitter != NULL_KEY) { llRequestPermissions(OwnerKey, PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS | PERMISSION_CONTROL_CAMERA); } else { llOwnerSay("Stood up"); llSetStatus(STATUS_PHYSICS, FALSE); llReleaseControls(); llStopAnimation(Anim); Driver = NULL_KEY; } } } run_time_permissions(integer perms) { if(perms == (PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS | PERMISSION_CONTROL_CAMERA)) { Driver = Sitter; Linear = <0,0,0>; Angular = <0,0,0>; llStopAnimation("sit"); llStartAnimation(Anim); 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, // 1 is active, 0 is inactive CAMERA_BEHINDNESS_ANGLE, 2.0, // (0 to 180) degrees CAMERA_BEHINDNESS_LAG, 0.1, // (0 to 3) seconds CAMERA_DISTANCE, 8.0, // ( 0.5 to 10) meters CAMERA_FOCUS_LAG, 0.1 , // (0 to 3) seconds CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_FOCUS_THRESHOLD, 0.5, // (0 to 4) meters CAMERA_PITCH, 20.0, // (-45 to 80) degrees CAMERA_POSITION_LAG, 0.1, // (0 to 3) seconds CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_POSITION_THRESHOLD, 0.5, // (0 to 4) meters CAMERA_FOCUS_OFFSET, <0,0,0> // <-10,-10,-10> to <10,10,10> meters ]); llSetStatus(STATUS_PHYSICS, FALSE); llSetPos(llGetPos() + <0,0,0.25>); vector rot = llRot2Euler(llGetRot()); llSetRot(llEuler2Rot(<0,0,rot.z>)); llSetVehicleType(VEHICLE_TYPE_AIRPLANE); // linear friction llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <100.0, 100.0, 100.0>); // uniform angular friction llSetVehicleFloatParam(VEHICLE_ANGULAR_FRICTION_TIMESCALE, 0.5); // linear motor llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <0.0, 0.0, 0.0>); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_TIMESCALE, 1.0); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 1.0); // angular motor llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, <0.0, 0.0, 0.0>); llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_TIMESCALE, 1.0); llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 2.0); // hover llSetVehicleFloatParam(VEHICLE_HOVER_HEIGHT, 0.0); llSetVehicleFloatParam(VEHICLE_HOVER_EFFICIENCY, 0.0); llSetVehicleFloatParam(VEHICLE_HOVER_TIMESCALE, 360.0); llSetVehicleFloatParam(VEHICLE_BUOYANCY, 0.988); // linear deflection llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.0); llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 1.0); // angular deflection llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0.25); llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 100.0); // vertical attractor llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5); llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 1.0); // banking llSetVehicleFloatParam(VEHICLE_BANKING_EFFICIENCY, 0.0); llSetVehicleFloatParam(VEHICLE_BANKING_MIX, 1.0); llSetVehicleFloatParam(VEHICLE_BANKING_TIMESCALE, 1.0); // default rotation of local frame llSetVehicleRotationParam(VEHICLE_REFERENCE_FRAME, <0.00000, 0.00000, 0.00000, 0.00000>); // removed vehicle flags llRemoveVehicleFlags(VEHICLE_FLAG_NO_DEFLECTION_UP | VEHICLE_FLAG_HOVER_WATER_ONLY | VEHICLE_FLAG_HOVER_TERRAIN_ONLY | VEHICLE_FLAG_HOVER_UP_ONLY | VEHICLE_FLAG_LIMIT_MOTOR_UP | VEHICLE_FLAG_LIMIT_ROLL_ONLY); // set vehicle flags llSetVehicleFlags(VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT); llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_ROT_LEFT | CONTROL_ROT_RIGHT | CONTROL_UP | CONTROL_DOWN | CONTROL_LBUTTON, TRUE, FALSE); llSetStatus(STATUS_PHYSICS, TRUE); llSetTimerEvent(0.001); } } control(key name, integer levels, integer edges) { if((levels & CONTROL_LBUTTON)) { llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <0,0,0>); llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, <0,0,0>); llSetStatus(STATUS_PHYSICS, FALSE); llSleep(0.1); llSetStatus(STATUS_PHYSICS, TRUE); return; } if((edges & levels & CONTROL_UP)) Linear.z += FlightUpPower; else if((edges & ~levels & CONTROL_UP)) Linear.z = 0.0; if((edges & levels & CONTROL_DOWN)) Linear.z -= FlightDownPower; else if((edges & ~levels & CONTROL_DOWN)) Linear.z = 0.0; if((edges & levels & CONTROL_FWD)) Linear.x += FlightForwardPower; else if((edges & ~levels & CONTROL_FWD)) Linear.x = 0.0; if((edges & levels & CONTROL_BACK)) Linear.x -= FlightReversePower; else if((edges & ~levels & CONTROL_BACK)) Linear.x = 0.0; if((edges & levels & CONTROL_LEFT)) Linear.y += FlightStrafePower; else if((edges & ~levels & CONTROL_LEFT)) Linear.y = 0.0; if((edges & levels & CONTROL_RIGHT)) Linear.y -= FlightStrafePower; else if((edges & ~levels & CONTROL_RIGHT)) Linear.y = 0.0; if((edges & levels & CONTROL_ROT_LEFT)) Angular.z = FlightTurnPower; else if((edges & ~levels & CONTROL_ROT_LEFT)) Angular.z = 0; if((edges & levels & CONTROL_ROT_RIGHT)) Angular.z = -FlightTurnPower; else if((edges & ~levels & CONTROL_ROT_RIGHT)) Angular.z = 0; } timer() { llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, Linear); llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, Angular); } } I am terrible with vehicles, can somebody tell me why my flying vehicle can't turn?
  12. Can somebody tell me the best way to move an object kinda like a conver belt. So The belt is not physical but when it move to the side, anything physical ontop of it will be moved with it. I saw this using llSetKeyframedMotion but I was wondering if there is another/better way.
  13. oh wow I didn't know that was the general rule, I thought people would just use scripts to also adjust the position to make it look like it swung open. hmm ok thanks If anybody does have a script that adjusts position without needing to slice the door, I'd definitly try it.
  14. So I'm trying a bunch of door scripts right now and for some reason none of them are working for me! 90% of them just rotate in the center instead of rotating AND moving to the side. Am I missing something? I have a multi prim door... the scripts rotate in the center. I take the door down to 1 prim and link it to walls and stuff (not setting the door to root) and the door still rotates in the center. I guess what I'm looking for is a door script for multi prims (door handle and stuff) which isn't linked to the house which calculates it's current rotation and simply adds 90 degrees and adjusts position so it's not in the middle! Can anybody help?
×
×
  • Create New...