Jump to content

VirtualKitten

Resident
  • Posts

    916
  • Joined

  • Last visited

Everything posted by VirtualKitten

  1. yes time is a float holds more than 0.2 as default Doing calculations inside list is shown on wiki pages http://wiki.secondlife.com/wiki/LlSetKeyframedMotion float time = (float)llVecDist(l_pos,(l_pos+l_dest))/TARGET_AFFINITY; if(time < 0.2) time = 0.2; Moving..Pos:<204.42910, 41.32936, 3500.53300> ,Rot<-0.93480, -0.01975, -0.05265, 0.35068>, Dest:<204.93770, 45.28412, 3496.03200>
  2. Am getting lots of strange parameter errors on the following line which looks ok llSetKeyframedMotion([(l_dest-l_pos), NormRot(l_rot), time],[KFM_DATA ,KFM_TRANSLATION|KFM_ROTATION,KFM_MODE, KFM_FORWARD]); it results in the console error "Syntax error in llSetKeyframedMotion() call. Incorrect number of elements in param list." idk why?
  3. Prof i had a friend over Solace Tiger Paw who helped sort out cast ray and was super fun we worked out CastRay was firing of in totally wrong direction and this is what we ended up with : list targets = llCastRay(emitPos, emitPos + (12*llRot2Up(emitRot)), [RC_DETECT_PHANTOM, TRUE]); Now it was what it should have been now the llMoveToTarget(pos, 5.0); might be a problem as it only works with physical prims i forgot this and why its not moving . this all needs thinking through as firing physical items might not be desirable and the alternative is KeyFrameMotion. I really need to think about this and the prospects of collision as am not sure its a good or bad thing?
  4. @Profaitchikenz Haiku I already did these steps ion my own its 70 degrees inline with the parts i sent you in respect to the emitter I dint know how to add these in as nothing i have tried has worked so far and in fact as discussed it seems to be drilling straight own and not going out at 70 degrees same as beam I am unsure why you don't understand what I am saying As have already said this and am now repeating myself as you didn't listen first time I even showed you images from properties of the bar showing you the beam was 70 degrees idk what more to say I knw you are trying your best to help and I appreciate it too but if you don't know what's happening and listen to what i tell and show you as a result of what you asked me to provide. Its very frustrating I still think i was better with trig at least those routines i wrote put the ball on the spot even if it was not at any other rotation. This cant even do that much . here it is again Hugs D.
  5. Looking at your code Prof RezAt is only set to the resultant vector of target ii+1 no other addition is given . Is this why it has no forward position idk or is the ray completely wrong and you are relying on that which doesn't work. idk I am unsure what you mean about the indicator beam i have a particle. How can i tell where the Ray is pointing as its results just show it must be pointing down not at 70 degrees out from emitter. Denise X
  6. Hi Prof I think either the end of the castray is calculated wrong or the rezAt is wrong . The routines are essentially same as you have in puff . Code to create flame and rez fire. integer link = check_for_prim("Fire Emitter"); //llOwnerSay("link:"+(string)link); findLocations(); list l = llGetLinkPrimitiveParams(link,[PRIM_POSITION,PRIM_ROTATION]); rotation emitRot = (rotation) llList2String(l,1); vector emitPos = llList2Vector(l,0); rotation correction = llEuler2Rot(<0.0,0.0,70.0>* DEG_TO_RAD); list targets = llCastRay(emitPos, emitPos + <0.0, 0.0, 12.0> * (correction * emitRot ), [RC_DETECT_PHANTOM, TRUE]); if( _debug) llOwnerSay("Raycast got " + llDumpList2String(targets, ",") ); integer iiMax = llGetListLength(targets); integer hits = llList2Integer(targets, iiMax-1); if(hits > 0 ) { iiMax -=1; // move back from the result count to the last returned pair integer ii; list targetDetails; if( hits > 0) { for( ii = 0; ii < iiMax; ii+=2) { targetDetails = llGetObjectDetails(llList2Key(targets, ii), [OBJECT_NAME, OBJECT_POS]); string targetName = llList2String(targetDetails, 0); vector targetPos = llList2Vector(targetDetails, 1); vector rezAt = llList2Vector(targets, ii+1); // See the caveat regarding silently failing at too great a distance if(_debug) llOwnerSay("Found " + targetName + " (" + (string) targetPos + ") " + " at rezAt" + (string) rezAt ); vector size = llList2Vector(llGetLinkPrimitiveParams(1,[PRIM_SIZE]),0); list box = llGetBoundingBox( llGetKey()); vector c = (llList2Vector(box, 0) + llList2Vector(box, 1)) * 0.5; string axis=""; llOwnerSay("Axis "+(string)box); llOwnerSay("foward facing is "+ axis + " axis"); llRezObject("Fireball II MoveTo(llDie)", llGetPos(),ZERO_VECTOR, ZERO_ROTATION, 0); // llRezObject("Fireball(llDie)", rezAt, emitPos, emitRot, 0 ); llSleep(2); llSay(-6,"D|" +(string)(rezAt)+"|"+(string)emitRot); } } }
  7. Please see gif i uploaded Prof above I don't think cast ray is doing its job I am a bit stuck im in world please if you have time
  8. ok changed it to z axis even though model is Y now get [06:25] Fire Emitter: Emitter Region pos = <204.59780, 42.19997, 3499.28400> Emitter Region rot = <-0.83674, -0.03068, -0.04713, 0.54470> [06:25] Fire Emitter: VK method Pos = <210.97770, 42.22906, 3499.63100> VK method rot = <-0.56183, 0.11590, -0.73342, -0.36470> [06:25] Fire Emitter: Raycast got 459c4a1b-b491-bde1-a136-f1bd309d87e9,<197.786700, 45.069440, 3496.038000>,1 [06:25] Fire Emitter: Found *alirium* nanohana (<198.54100, 40.09956, 3495.57500>) at rezAt<197.78670, 45.06944, 3496.03800> [06:25] Fire Emitter: Axis <-6.609726, -3.117524, -1.771039><6.609726, 3.117524, 1.771039> [06:25] Fire Emitter: foward facing is axis [06:26] Fireball II MoveTo(llDie): Dracarys<197.78670, 45.06944, 3496.03800><-0.83674, -0.03068, -0.04713, 0.54470> [06:26] Fireball II MoveTo(llDie): Moving..<197.78670, 45.06944, 3496.03800> But the ball doesn't get the correct target but gets to target not moving idk
  9. well its that line in [1] that doesnt want to work with cast ray here
  10. I changed my positions to Gobals and got no hits at all list l = llGetLinkPrimitiveParams(link,[PRIM_POSITION,PRIM_ROTATION]); rotation correction = llEuler2Rot(<0.0,70.0,0.0>* DEG_TO_RAD); // [1] Causing it to stop using llCastRay rotation emitRot = (rotation) llList2String(l,1); vector emitPos = llList2Vector(l,0); list targets = llCastRay(emitPos, emitPos + <0.0, 0.0, 12.0> * (emitRot * correction), [RC_DETECT_PHANTOM, TRUE]); [03:47] Fire Emitter: Emitter Region pos = <204.59780, 42.19997, 3499.28400> Emitter Region rot = <-0.83674, -0.03068, -0.04713, 0.54470> [03:47] Fire Emitter: VK method Pos = <210.97770, 42.22906, 3499.63100> VK method rot = <-0.56183, 0.11590, -0.73342, -0.36470> [03:47] Fire Emitter: Raycast got 0
  11. I changed my rezz to llRezObject("Fireball II MoveTo(llDie)", llGetPos(),ZERO_VECTOR, ZERO_ROTATION, 0); it now rezzes at place but doesnt seem to get move command
  12. Hi Prof I ran it and had these results I had to add in integer emitter with link number to get it to compile. No I am always grateful of help . Its a lot to comprehend kisses [02:09] Fire Emitter: Emitter Region pos = <204.54550, 42.19197, 3499.22000> Emitter Region rot = <-0.82161, -0.02047, -0.02956, 0.56892> [02:09] Fire Emitter: VK method Pos = <210.91180, 42.26188, 3499.57500> VK method rot = <-0.58705, 0.12782, -0.71923, -0.34891> [02:09] Fire Emitter: Raycast got 941cf7c5-099a-739a-6f7e-4d2969002c72,<213.903500, 38.844600, 3496.037000>,1 [02:09] Fire Emitter: Found Skye Land Forms Simple Bumpy Square (<226.17260, 28.34417, 3496.03300>) at rezAt<213.90350, 38.84460, 3496.03700> [02:09] Fire Emitter: Axis <-6.609726, -3.117524, -1.771039><6.609726, 3.117524, 1.771039>
  13. [14:40] Fire Emitter: Raycast got 941cf7c5-099a-739a-6f7e-4d2969002c72,<213.903500, 38.844600, 3496.037000>,1 [14:40] Fire Emitter: Found Skye Land Forms Simple Bumpy Square (<226.17260, 28.34417, 3496.03300>) at rezAt<213.90350, 38.84460, 3496.03700> integer link = check_for_prim("Fire Emitter"); list l = llGetLinkPrimitiveParams(link,[PRIM_POS_LOCAL,PRIM_ROT_LOCAL]); rotation correction = llEuler2Rot(<0.0,70.0,0.0>* DEG_TO_RAD); // Part you are missing [1] rotation emitRot = (rotation) llList2String(l,1)*llGetRot(); vector emitPos = llList2Vector(l,0)+llGetPos(); list targets = llCastRay(emitPos, emitPos + <0.0, 0.0, 12.0> * (emitRot * correction), // // Part you are missing [2] [RC_DETECT_PHANTOM, TRUE]); if( _debug) llOwnerSay("Raycast got " + llDumpList2String(targets, ",") ); integer iiMax = llGetListLength(targets); integer hits = llList2Integer(targets, iiMax-1); if(hits > 0 ) { iiMax -=1; // move back from the result count to the last returned pair integer ii; list targetDetails; if( hits > 0) { for( ii = 0; ii < iiMax; ii+=2) { targetDetails = llGetObjectDetails(llList2Key(targets, ii), [OBJECT_NAME, OBJECT_POS]); string targetName = llList2String(targetDetails, 0); vector targetPos = llList2Vector(targetDetails, 1); vector rezAt = llList2Vector(targets, ii+1); // See the caveat regarding silently failing at too great a distance if(_debug) llOwnerSay("Found " + targetName + " (" + (string) targetPos + ") " + " at rezAt" + (string) rezAt ); vector size = llList2Vector(llGetLinkPrimitiveParams(1,[PRIM_SIZE]),0); list box = llGetBoundingBox( llGetKey()); vector c = (llList2Vector(box, 0) + llList2Vector(box, 1)) * 0.5; string axis=""; llOwnerSay("Axis "+(string)box); llOwnerSay("foward facing is "+ axis + " axis"); llRezObject("Fireball II MoveTo(llDie)", emitPos, emitPos, emitRot, 0); llSay(-6"D|" +(string)rezAt+"|"+(string)emitRot); // Destination to send ball [3] //llRezObject("Fireball(llDie)", rezAt, emitPos, emitRot, 0); } } } This is what happens to the Fire ball after its rezed at same location of emitter and the moved by at_target(integer tnum, vector targetpos, vector ourpos) { target_arival_id= __llTargetRemove(target_arival_id); flames(); llSetTimerEvent(20); } listen(integer ch, string name, key id, string data) { list p = llParseString2List(data,["|"],[]); if(llList2String(p,0) == "D" && ch = _ch) { vector pos = (vector)llList2Vector(p,1); target_arival_id = llTarget(pos*llList2Rot(p,2), 50.0); llMoveToTarget(pos*llList2Rot(p,2), 5.0); } } } As you can see the rezzed ball does not move to the correct position on Y axis end of the flames: Now looking at point [1] I need a code or coding that calculates front of creature to calculate displacement of 70 degrees to correct axis depending on rotation . Clearly your calculate llCastray are or must be emitting in wrong direction I wondered if i could use llRot2Fwd () some how or bounding box to find front Idk, the problems with 100m ray destination still seem to need to be found as worked this afternoon and failed later in day resulting them back to 12m. i wonder if this was why rotating 180 degrees failed to create ray. This all said i duplicated my gate 90 degrees and you can see ball does not end up at target idk as it does not catch fire. I am unsure why It was before I added a rotation in of the emitter to it . However it did not have the result I expected to put the ball on the Y axis again i thing i need code to work out front and reverse axis for when the emitter rotates 180 or in a circle as currently it is placing it on X axis not Y . Also note it ends up slightly higher than emitter very odd . I expected it to be on the floor and move diagonally down to end target position. The other ball under emitter is nothing important its my editable version to copy to the emitter I hope you can see Prof something is still needing work on your code . Sorry but there it is x Denise
  14. were is the line i gave you earlier multiplying the angle it will be on wrong axis on x positive or z positive idk
  15. @Profaitchikenz Haiku It seems the PRIM_SIZE doesn't change its axis depending on the rotation of the item huh hats no help then and a bit strange to be honest . Also prof try rotating your creation puff it doesn't work in different directions try rotating it 180 degrees it wont find a ray
  16. I can post another angle it looks like axis are transposed and the height of floor is missing he fact that id flaming of to the right the same distance that should be in Y is helpful however the important floor element is missing Do I have to write a axis changer that will change axis in accordance with front facing . I vaguely remember this in the past if its not XYZ is it YZX and then ZYX? for the different options assuming calculation is forward facing X i would need to transform it YZX to be correct for a model Y facing. An to identify the facing front direction how do i do that by script please ? can i do it from size where largest size is the axis forward? so ie if ((l.x > l.y && l.x > l.z ) && !(l.y > l.x && l.y > l.z ) ) axis ="X"; else if(l.y > l.x && l.y > l.z ) axis = "Y"; else axis ="Z" ; but its working but PRIM_Size is bringing back [09:52] Fire Emitter: Axis <13.11945, 6.13505, 3.44208>
  17. Also I wrote the code to move and it moved wrong place showing it was on target changing your code llRezObject("Fireball II MoveTo(llDie)", emitPos, emitPos, emitRot, 0); llSay(-6,"Dracarys|" +(string)rezAt); default { on_rez(integer startup_param) { flame=1; target = 1; integer glistener = llListen(_ch,"",llGetOwner(),""); //llSetObjectDesc("NEW PRIM DESCRIPTION"); //Perhaps link and drop item or listen // for llSay to set decription. } timer() { if(flame == 1) {smoke();flame = 0; llSetTimerEvent(5);} else llDie(); } not_at_target () { } at_target(integer tnum, vector targetpos, vector ourpos) { target_arival_id= __llTargetRemove(target_arival_id); flames(); llSetTimerEvent(20); } listen(integer ch, string name, key id, string data) { list p = llParseString2List(data,["|"],[]); if(llList2String(p,0) == "Dracarys" && ch = _ch) { vector pos = (vector)llList2Vector(p,1); target_arival_id = llTarget(pos, 50.0); llMoveToTarget(pos, 5.0); } } } and changing fire ball in the fire emitter . This had a peculiar result Prof fire tracked to an odd location any ideas: [08:08] Fire Emitter: Raycast got 941cf7c5-099a-739a-6f7e-4d2969002c72,<213.996500, 38.753780, 3496.037000>,1 [08:08] Fire Emitter: Found Skye Land Forms Simple Bumpy Square (<226.17260, 28.34417, 3496.03300>) at rezAt<213.99650, 38.75378, 3496.03700>
  18. That said Prof I found no 12m limits on wiki llCastRay website idk , infact example here give 25m in fact today i have it with 100m working :http://wiki.secondlife.com/wiki/LlCastRay [07:34] Fire Emitter: Raycast got 941cf7c5-099a-739a-6f7e-4d2969002c72,<213.996500, 38.753780, 3496.037000>,1 [07:34] Fire Emitter: Found Skye Land Forms Simple Bumpy Square (<226.17260, 28.34417, 3496.03300>) at rezAt<213.99650, 38.75378, 3496.03700> So there is til much to work out Mine is 8.25572m away so why is it not rezing ?
  19. so in fact rotation correction = llEuler2Rot(<0.0,70.0,0.0>* DEG_TO_RAD); should work ? Raycast got 941cf7c5-099a-739a-6f7e-4d2969002c72,<213.996500, 38.753790, 3496.037000>,1 [07:12] Fire Emitter: Found Skye Land Forms Simple Bumpy Square (<226.17260, 28.34417, 3496.03300>) at <213.99650, 38.75379, 3496.03700> But nothing was still rezed Am working on new fireball with the following but still thinking about how to degin around without initial say and listen on_rez(integer startup_param) { flame=1; //llSetObjectDesc("NEW PRIM DESCRIPTION"); //Perhaps link and drop item or listen // for llSay to set decription. vector pos = (vector)llGetObjectDesc(); target_arival_id = llTarget(pos, 50.0); llMoveToTarget(pos, 5.0); } at_target(integer tnum, vector targetpos, vector ourpos) { target_arival_id= __llTargetRemove(target_arival_id); flames(); llSetTimerEvent(20); } and
  20. Um prof I said the thing i sent you said it was 70 degrees the particle is as you say horizontal at rest the same as the part i sent you and pictured
  21. Hi Prof I sent you in world [14:27] Second Life: Inventory item 'fire trajectory2 as per image' offered As requested . I textured the dragon at 100% to make it invisible
  22. Well i saw the wiki page: Maximum rez distance After tests on server 1.38, these figures were measured - (on some earlier server versions the same further-than-10-meter rezzes have been possible). The distance measured is between the center of the rezzing prim and the center of the prim that is rezzed. The tests did not include rezzing from or the rezzing of link_set objects. A 10.0 meter cube could rez a 0.5 meter cube just beyond 18.6 meters away. A 0.01 cube could rez a 0.5 meter cube just beyond 10.0 meters away. Which is limitation on rezzing this gets a whole lot more complicated as i have a start and end point from ll Cast Ray evenn though we do not know why it only worked at 12m not 32m and need each prim to cascade rez the next one less than 9.5 metres apart then lldie before the last distance creating fire . Does that make sense or can a velocity given to the rezed item achieve the same result before flaming on at destination. http://wiki.secondlife.com/wiki/LlGodLikeRezObject I found this but it made no sense . I am guessing with start and end and 9.5m distance a velocity could be used to take it rest of the way if not could we not rez daughter and then daughter from that in a cascade to reach target ?
  23. I tried it returns 0 list empty no results from ray cast on everything up here . you can get height from return values prints llGetPos() prod idk why your cast ray doesn't work has had not much luck with them in past . Come see for yourself I have 30mins before work
×
×
  • Create New...