Jump to content

Xed Saunders

  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About Xed Saunders

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. thanks. i'll try iw as i can login, by the way doing a quick copy and paste i've pasted an error in the stride, which is 1, your guess was correct
  2. i'm going mad with a simple thing, i can't see what i'm doing wrong, i am sorting a list composed by strings. list names=["36.321","name2","30.456","name1","30.455","name3","29.452","name4"]; list sorted=llListSort(names,2,TRUE); llSay(0,"output:"+(string)sorted); this works and produce Object: output:29.452name430.455name330.456name136.321name2 this don't list newentry=[]; list allbest=[]; default { state_entry() { llListen(-3500, "", "", ""); } listen(integer channel, string name, key id, string listener) { newentry=newentry+[llParseString2List(listener,[""],[" "])]; allbest=llListSort([newentry],1,TRUE); llSay(0,"output:"+(string)allbest); } } produce output:36.234name534.234name132.234name4 is the order i type them in the chat with /-3500 TimeName can't llistsort be used with a listener? tia
  3. thanks for the brilliant clarification, i had to read it 3 times in order to understand what you meant. look like a very complex stuff, maybe too much for my skills lol
  4. thanks for the great script Extrude, i'll try to use my skill to build at least nice cars and wheel meshes regarding Emma question, yes that is the same i'm experiencing, the sitter position rotate so maybe the seat position must be adjusted as the car spins.
  5. hi all, i'm builting a simple ferris wheel from the scratch, i've built two scripts, one for the wheel itself and one for the cars. this is the root (wheel) script rotation rot_xyzq; integer on; rotate() { llSetRot(llGetRot()*rot_xyzq); //Do the Rotation... } default { state_entry() { vector xyz_angles = <0,-1.0,0>; // This is to define a 1 degree change vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to Radians rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation llListen(-65538,"","",""); } listen(integer channel, string name, key id, string message) { if (message=="start") { on = !on; if (on) { llSetTimerEvent(0.05); } else { llSetTimerEvent(0.0); llRegionSay(6000,"reset"); } } } timer() { rotate(); llRegionSay(6000,"click"); } } and this is the car script rotation rot_xyzq; rotate() { llSetRot(llGetRot()*rot_xyzq/llGetRootRotation()/llGetRootRotation()); //Do the Rotation... } default { state_entry() { vector xyz_angles = <0,1.0,0>; // This is to define a 1 degree change vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to Radians rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation llListen(6000, "", "", ""); } listen(integer channel, string name, key id, string message) { if (message=="click") { rotate(); } } } the wheel move stuttering a bit but works, i've avoided to use the lltargetomega even if much smoother because that is a viewer thing and when i tried it i've i got much troubles than joy. i have set 8 wagons around the root each one containing the child script,each wagon is a single mesh prim the questions i have are two, beside the scripts itself that can be enhanced, the wheel rotate off center, i have a cylindrical prim which is my root and when i start the scripts the cars rotate around it using a different path, i have to de-center the root to have the wagons rotate around the wheel. how to fix this? then the biggest problem, being a ferris wheel i must provide seats, i tried to add a prim in the car to let someone sit but even if the prim is linked to the car the sit animation rotate with the wheel i tried to add avsitter2 both straight in the car or using a separate prim but results are the same. the sitter rotate and when the wagon is on the top of the wheel it is upside down. look like i have to use another approach, in design or there is a solution to fix the seat with the rotation? thanks in advance
  6. thanks to all, string player= llKey2Name(llGetOwnerKey(llDetectedKey(0))) ; did the trick, now i have to find how to modify the vehicle rezzer because the owner is the rezzer owner, not the toucher id, look like i can't use a simple llRezObject("Object", llGetPos() + <0.0,0.0,1.0>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0);
  7. hi, i'm trying to make a sort of racetrack where i've put a start/finish line prim, i've used on it llVolumeDetect(true) so it act like a phantom and a collision event using llDetectedName(0) to get the name of the player crossing the line. all works flawlessy if i cross the start/finish line walking, if i use some kind of a vehicle the collision is detected with the vehicle and not with the avatar. looking through the forum i've seen some examples of filtering collisions using this if (llDetectedType(0) & AGENT_BY_LEGACY_NAME) but it still does not apply to my case because only the vehicle collision is detected not the avatar riding it dunno if collisions can be filtered so only avatar collisions are detected? maybe i should use a sensor rather than a collision event?
  8. yes, it suit my needs, it works with time.here is an unuseful program to test it case closed. list times; list sorted; default { state_entry() { llResetTime(); } touch_start(integer num_touch) { float time = llGetTime(); llResetTime(); times = times+[time]; llSay(0,(string)time + " seconds have elapsed since the last touch." ); sorted = llListSort(times,1,TRUE); string tmp = llDumpList2String(sorted,"*"); llOwnerSay("sorted:"+tmp); } }
  9. if you are sure of this statement this seem to me the easiest solution, i'll try the other suggestions too, thank you all
  10. forgive the mess time is a string in xx.xxx format list besttime = besttime+[time]; sort(); string sort() { string bestlap; list best = llListSort( besttime, 1, TRUE ); string primo = (llList2String(best,0)); timelist = llParseString2List(primo,["."],[""]); integer secondi = (llList2Integer(timelist,0)); integer decimi = (llList2Integer(timelist,1)); string parse = getTime(secondi); //this is another user function converting seconds in minute.seconds bestlap=parse+"."+(string)decimi; return bestlap; //mm.ss.ddd } i've seen not always i get the best time from the list, surely there is something wrong in my code
  11. try putting 7.453 as first number of the list result is Object: 7.453, 1.345, 65.432, 23.433
  12. hello, i'm in the need to sort a list composed by float numbers llListSort does not produce reliable results, and i am not able to find any example on the wiki. the list is composed by dot separated values like this 1.345 2.453 65.432 23.433 i've tried to convert float to string before to insert them in the list but llListSort does not work either any solution? thanks
  13. ok, having just one listener i'll end up to not stop it but to offer the option to remove the scripts if someone is worried about the lag. many thanks and happy new year everyone
  14. hi everyone, probably this has been already asked but i was not able to find a definitive answer. i have a hud and a wearable mesh, both objects communicate using listeners,the hud send commands to the mesh and the scripts inside it do the job. all work flawlessy but as reported in the wiki is always a good practice to stop the listener after it got and execute the command. doing this the mesh interrupt the listener and don't get anymore commands from the hud. my simple solution was to comment the lllistenremove row but of course it leave the listener always on. what happen doing this? it will eat memory and lead to a crash soon or later? as second chance, is there any example on how to reactivate remotely a removed listener? thanks
  • Create New...