Jump to content

Dora Gustafson

Advisor
  • Posts

    2,120
  • Joined

  • Last visited

Everything posted by Dora Gustafson

  1. In the OP I don't read any request for identifying the agents In that case the task becomes simple list agents;default{ state_entry() { agents = llGetAgentList( AGENT_LIST_PARCEL, []); llSetTimerEvent( 4.0); } timer() { list L = llGetAgentList( AGENT_LIST_PARCEL, []); if ( llGetListLength( L) > llGetListLength( agents) ) { // the population has increased, take appropriate action } agents = L; }} This approach will not trigger when the number of entries equals the number of exits in one time window That may or may not be a problem :smileysurprised::smileyvery-happy:
  2. It is an interesting analysis you come up with :smileysurprised::smileyvery-happy: I will not try to take it any further, English is not my native language so I am on thin ice
  3. There is no such thing as a silly question! is very ambiguous because 'silly' attach to question and not the person asking the question or anything else When interpreted like: It is not silly to ask a question! makes much more sense, but then again that may not be what was meant :smileysurprised::smileyvery-happy:
  4. SweetLadyMell wrote: Well, hiding as such is not the reason, I mean, if something does some..."thing", it stands to reason there is a script, no sense in assuming otherwise, and no sense in insulting the people in assuming they'd not be aware of the script. I just like the script to be non-editable, and (if possible) not viewable too...if the user can see there is a list of stuff (scripts, sounds, animations) in that prim, so be it, just...dont tinker with the workings and come cry that it's "bwoken".... I guess it has been stated in the thread more than once: if the script is No-mod it can't be edited and it can't be viewed. If it could be viewed the source could be read and modified and the script would be modifiable. :smileysurprised::smileyvery-happy:
  5. If you want it to go non transparent on rez use the example from the wiki: default{ on_rez(integer start_param) { // Restarts the script every time the object is rezzed llResetScript(); }} If you don't want it to go transparent on the first click move the toggle ON flag to the end of the touch event handler where it will toggle after use
  6. The most obvious is to scale buildings and stuff so it fit avatars. That's what I do I know that normal size for avatars is not well defined but it is the best there is and you must know what size you are building for :smileysurprised::smileyvery-happy:
  7. If you wear the sensor in an attachment it will not detect the owner If not attached you make a simple filter like this: sensor (integer num_detected){ if ( llDetectedKey(0) != llGetOwner() ) { // do your stuff }} :smileysurprised::smileyvery-happy:
  8. It may be because your groups a aimed at subjects and themes that are not allowed in mature groups You could try to make the groups adult :matte-motes-evil:
  9. Global variables may be initialized by constants not by expressions like you have Do it in state_entry() instead :smileysurprised::smileyvery-happy:
  10. It does at least sometimes, but the camera usually ends up in an awkward position :smileysurprised::smileyvery-happy:
  11. The camera is set by either llSetCameraParams() or llSetCameraAtOffset(), llSetCameraEyeOffset() alternatively llSetLinkCamera() In case one you can move the camera back and forth (some called it zoom) by the mouse scroll wheel In case two the camera is totally locked to the prim with the script To fix it If the script has an option for not setting the camera, use that You need to replace or modify the script responsible for this camera control :smileysurprised::smileyvery-happy:
  12. I will not argue about the facts you have found about the angular velocity limit It looks like a imperial fact and should be noted as such by any scripter. Still the limit should be violated in the script that moves a prim on a circle and simultaneously rotate the prim one revolution, all completed during one minute. The motion is composed of a translation (round the circle) and a rotation (round the prim axis) The rotation is 360/60 = 6 degrees per second which is definitely lower than 9 degrees per second, but it doesn't produce any stutter. Your observation about the phenomena being linked to a moving coordinate system would show that rotation and translation in fact are linked. The idea to me looks like sheer speculation at this point. One could hope for better slow rotations, but you and I know it is not likely to happen within the SL we know, so this discussion is purely academic. There should always be room for an academic discussion The angular velocity limit being the same for llSetKeyFramedMotion(), llTargetOmega() and llSetAngularVelocity() makes me think that an ancient routine for rotation is reused in all rotations. This is only speculation of course. :smileysurprised::smileyvery-happy:
  13. It is easy to specify a 1 RPM motion nowhere near causing rounding errors // one RPM script by Dora Gustafson, Studio Dora 2014integer S;list KFMlist = [];default{ state_entry() { integer frams = 3; list L = [llAxisAngle2Rot( <0.0, 1.0, 0.0>, TWO_PI/(float)frams), 60.0/(float)frams]; llOwnerSay("Rotation and time per frame= "+llDumpList2String( L, ", ")+" by "+(string)frams+" frames"); while ( frams-- ) KFMlist += L; } touch_end( integer n) { llSetKeyframedMotion( [], []); llSleep( 0.2 ); S = !S; if ( S ) llSetKeyframedMotion( KFMlist, [KFM_DATA, KFM_ROTATION, KFM_MODE, KFM_LOOP]); }} You get these data Rotation and time per frame= <0.000000, 0.866025, 0.000000, 0.500000>, 20.000000 by 3 frames And still there is no rotation most of the time Try it with 36 frames(one for each 10 degrees) and you get: Rotation and time per frame= <0.000000, 0.087156, 0.000000, 0.996195>, 1.666667 by 36 frames Still nowhere near to rounding problems and still no smooth rotation Funny because the script I posted previously // frames for circular motion, plane, script by Dora Gustafson, Studio Dora 2014// function computes relative moves and rotations for a Key Framed Motion// function takes arguments: velocity, some radius-vector and angle for motion in degrees// the turning can be in any plane in space. Plane given by the two vectors// The two vectors must not point in same or opposite direction// turn prim forward before motion startvector Velocity = <0.0, -0.10471975512, 0.0>;vector Radius = <1.0, 0.0, 0.0>;float Angle = 360;integer rev;list L;list framesCircular( vector velocity, vector radius, float angle ){ // Compute circle center and first position vector center = llVecMag(radius)*llVecNorm((velocity%radius)%velocity); vector startRadiusVector = -center; // Compute time per step float arch = angle*DEG_TO_RAD; float steps = (float)llRound(arch/(10.0*DEG_TO_RAD)); float dT = arch*llVecMag(radius)/llVecMag(velocity)/steps; dT = llRound(45.0*dT)/45.0; if ( dT < 0.11111111 ) dT = 0.11111111; // initialize loop list KFMlist = []; vector axis = velocity%radius; rotation baserot = llGetRot(); vector U = center+startRadiusVector; rotation rotU = baserot; vector V; rotation rotV; float step = 0.0; while ( step < steps ) { step += 1.0; rotV = llAxisAngle2Rot( axis, arch*step/steps); V = center+startRadiusVector*rotV; rotV = baserot*rotV; KFMlist += [V-U, rotV/rotU, dT]; rotU = rotV; U = V; } return KFMlist;}default{ touch_start( integer n) { llSetKeyframedMotion( [], []); llSleep(0.2); if ( rev ) llSetKeyframedMotion( L, [KFM_MODE, KFM_REVERSE]); else { // first turn prim correct, X-axis in velocity's direction llSetRot( llAxes2Rot( llVecNorm( Velocity), llVecNorm(( Velocity%Radius)%Velocity), llVecNorm( Velocity%Radius))); // then do the motion L = framesCircular( Velocity, Radius, Angle); llSetKeyframedMotion( L, []); } rev = !rev; }} has a frame for each 10 degrees and the object rotates nicely as it moves along the circle so obviously rotation and translation are linked I will not guess about server-side rounding problems, I have no way of knowing and I consider every server-side problem to be handled by LL :smileysurprised::smileyvery-happy:
  14. Thank you for doing that I voted for it It surely must be some kind of bug :smileysurprised::smileyvery-happy:
  15. I don't know what is cooking The following script makes a prim complete a circular path in 1 minute and it works perfectly The malfunctioning script only rotates about one axis and has no translation like this one // frames for circular motion, plane, script by Dora Gustafson, Studio Dora 2014// function computes relative moves and rotations for a Key Framed Motion// function takes arguments: velocity, some radius-vector and angle for motion in degrees// the turning can be in any plane in space. Plane given by the two vectors// The two vectors must not point in same or opposite direction// turns prim forward before motion startvector Velocity = <0.0, -0.10471975512, 0.0>;vector Radius = <1.0, 0.0, 0.0>;float Angle = 360;integer rev;list L;list framesCircular( vector velocity, vector radius, float angle ){ // Compute circle center and first position vector center = llVecMag(radius)*llVecNorm((velocity%radius)%velocity); vector startRadiusVector = -center; // Compute time per step float arch = angle*DEG_TO_RAD; float steps = (float)llRound(arch/(10.0*DEG_TO_RAD)); float dT = arch*llVecMag(radius)/llVecMag(velocity)/steps; dT = llRound(45.0*dT)/45.0; if ( dT < 0.11111111 ) dT = 0.11111111; // initialize loop list KFMlist = []; vector axis = velocity%radius; rotation baserot = llGetRot(); vector U = center+startRadiusVector; rotation rotU = baserot; vector V; rotation rotV; float step = 0.0; while ( step < steps ) { step += 1.0; rotV = llAxisAngle2Rot( axis, arch*step/steps); V = center+startRadiusVector*rotV; rotV = baserot*rotV; KFMlist += [V-U, rotV/rotU, dT]; rotU = rotV; U = V; } return KFMlist;}default{ touch_start( integer n) { llSetKeyframedMotion( [], []); llSleep(0.2); if ( rev ) llSetKeyframedMotion( L, [KFM_MODE, KFM_REVERSE]); else { // first turn prim correct, X-axis in velocity's direction llSetRot( llAxes2Rot( llVecNorm( Velocity), llVecNorm(( Velocity%Radius)%Velocity), llVecNorm( Velocity%Radius))); // then do the motion L = framesCircular( Velocity, Radius, Angle); llSetKeyframedMotion( L, []); } rev = !rev; }} :smileysurprised::smileyvery-happy:
  16. I can confirm that a slow spin like that doesn't work like one could wish for I tried a completely different script but with same spin-rate and it looks awful The prim rests longer than it spins I am not sure it always was like that but with up to date viewer and server it is Second Life 3.7.19 (295700) Oct 20 2014 13:37:20 (Second Life Release) Release Notes You are at 33.3, 40.3, 1,279.9 in Nautilus - Suniaton located at sim10091.agni.lindenlab.com (216.82.48.157:13001) SLURL: http://maps.secondlife.com/secondlife/Nautilus%20-%20Suniaton/33/40/1280 (global coordinates 287,777.0, 268,328.0, 1,279.9) Second Life RC LeTigre 14.10.24.295913 Retrieving... CPU: Intel® Core i7-2600 CPU @ 3.40GHz (3392.28 MHz) Memory: 8174 MB OS Version: Microsoft Windows 8.1 64-bit (Build 9600) Graphics Card Vendor: NVIDIA Corporation Graphics Card: GeForce GTX 660/PCIe/SSE2 Windows Graphics Driver Version: 9.18.0013.4411 OpenGL Version: 4.4.0 NVIDIA 344.11 libcurl Version: libcurl/7.38.0 OpenSSL/1.0.1h zlib/1.2.8 J2C Decoder Version: KDU v7.0 Audio Driver Version: FMOD Ex 4.44.31 Qt Webkit Version: 4.7.1 (version number hard-coded) Voice Server Version: Not Connected Built with MSVC version 1600 Packets Lost: 163/132,897 (0.1%) :smileysurprised::smileyvery-happy:
  17. Now this thread is one month and I still can't update The wiki gets more outdated each day :smileysurprised::smileyvery-happy:
  18. One important aspect of using sculpties is that the land impact will increase when the 'new LI algoritm' is used When it is not used any sculpty is one prim and cost one LI which can be an advantage Here you can see when when the 'New algoritm' is used :smileysurprised::smileyvery-happy:
  19. It could be your script is not running When you open the script in the viewer's editor there is a check mark indicating if the script is running or not If you somewhere along the line saved the script with a compile error it was set not running and it will not be set running just by compiling a script without errors :smileysurprised::smileyvery-happy:
  20. I noticed a performance increase for far away objects, textures load much faster and I can increase draw distance from 100 to 300 meters without any penalty. That being said I think maybe the release is a bit premature: I see outfits loading slower than usually Mesh models load extremely much slower View at time of arrival: (meshes are missing) View one minute after arrival: Second Life 3.7.19 (295700) Oct 20 2014 13:37:20 (Second Life Release) Release Notes You are at 167.6, 144.9, 20.0 in MacMorris located at sim10762.agni.lindenlab.com (216.82.56.52:13000) SLURL: http://maps.secondlife.com/secondlife/MacMorris/168/145/20 (global coordinates 461,480.0, 306,065.0, 20.0) Second Life Server 14.10.17.295641 Release Notes CPU: Intel® Core i7-2600 CPU @ 3.40GHz (3392.29 MHz) Memory: 8174 MB OS Version: Microsoft Windows 8.1 64-bit (Build 9600) Graphics Card Vendor: NVIDIA Corporation Graphics Card: GeForce GTX 660/PCIe/SSE2 Windows Graphics Driver Version: 9.18.0013.4411 OpenGL Version: 4.4.0 NVIDIA 344.11 libcurl Version: libcurl/7.38.0 OpenSSL/1.0.1h zlib/1.2.8 J2C Decoder Version: KDU v7.0 Audio Driver Version: FMOD Ex 4.44.31 Qt Webkit Version: 4.7.1 (version number hard-coded) Voice Server Version: Not Connected Built with MSVC version 1600 Packets Lost: 1,973/324,403 (0.6%)
  21. Maybe you became member of a group where you pay liabilities :smileysurprised::smileyvery-happy:
  22. Two machines? Two different viewers? Two instances of the same viewer on the same machine? Note that when the viewer window isn't active and in focus the frame rate drops significantly! (place both viewer windows on the screen, shift focus between them and you will see) :smileysurprised::smileyvery-happy:
  23. Sounds can be limited to a parcel. Sounds can not reach beyond the parcel neither can outside sounds be heard on the parcel Sounds can not be avatar selective There is a very simple one level cache for sounds: llPreLoadSound() :smileysurprised::smileyvery-happy:
  24. Poltergeist Azarov wrote: Its totally a different script just coded for driver camera. Theres not even a sit target exists inside this script. Exact problem only occurs on 'unsits'... What event trigger the request for camera control?
  25. Thank you for explaining. The matter is so complex and deeply rooted in the way the viewer is programmed that I don't think it can be repaired by scripting:( I myself loose the set CameraParams and switch to default sometimes on sim crossing My solution was to give the driver the opportunity to switch between CameraParams and default by clicking the boat :smileysurprised::smileyvery-happy:
×
×
  • Create New...