Jump to content

Miranda Umino

Resident
  • Posts

    390
  • Joined

  • Last visited

Everything posted by Miranda Umino

  1. OBJECT_SELECTED is in fact named OBJECT_SELECT_COUNT OBJECT_SAT_UPON is named OBJECT_SIT_COUNT OBJECT_CREATION_TIME has kept this name OBJECT_REZ_TIME and OBJECT_RETURN_TIME are not implemented ( i don t know if it will be implemented or if it has been decided it could t be implemented ) The names are ( see http://wiki.secondlife.com/wiki/LlGetObjectDetails ) OBJECT_REZZER_KEY 32 Gets the key of the object that rezzed this object be it an object or an avatar. 36 characters key rezzer OBJECT_GROUP_TAG 33 Gets the avatar's group tag text. If id is not an avatar, an empty string is returned. max. 20 bytes string text OBJECT_TEMP_ATTACHED 34 Gets the integer boolean detailing if the object is temporarily attached. 1 character integerboolean OBJECT_ATTACHED_SLOTS_AVAILABLE 35 Gets the avatar's available attachment slot count. If id is not an avatar, 0 is returned. max. 2 characters integerboolean OBJECT_CREATION_TIME 36 Gets the object's creation time. This time is established with raw material rezzing through the build menu and with mesh uploads. This time is NOT established with inventory rezzes, scripted rezzes, object modifying, copying or transferring. If id is an avatar, an empty string is returned. max. 27 bytes stringtimestamp OBJECT_SELECT_COUNT 37 Gets the total number of agents selecting any links in the object. If id is an avatar, 0 is returned. max. 3 characters integerboolean OBJECT_SIT_COUNT 38 Gets the total number of agents sitting on any links in the object. If id is an avatar, 0 is returned. max. 3 characters integerboolean
  2. There is no need to reset the script ; you have only to exit the current event where your script is running ( for instante , to exit out of the ' 'touch_end ' event , or thr 'inkl_message_event' or the 'on_rez" event etc .. The garbage colletor is called when you exit your running event. If your event is running a function , when your script exit the function but continues to work in the same event , it doesn t call the garbage collector . If your event is running a loop, when your script exit the loop but continues to work in the same event , it doesn t call the garbage collector .
  3. If it s the local chat , it s not normal . Your setting should desactivate it . If it s the group chat or if it s the IM chat ( private messages ) , your setting doesn t desacticvate them . It s a desired feature The local chat from objects are not desactivated by this setting ( verify if it s not an object who talks in the local chat . And sometimes , some users , for instance DJ or hosts in clubs , use object to broadcat their local in a longer range ; talk to the manager of the club if it s the case) The settting for the voice ( microphone , vocal chat ) is a different setting The setting for the sounds ( gestures , others ) is a different setting too . Hiding avatars on a parcel does not affect voice chat, nor does it affect gesture and object sounds. To restrict these sounds to a parcel: Choose World > Place Profile > About Land or right-click on the parcel and choose About Land. Click the SOUND tab.To restrict gesture and object sounds to this parcel, select Restrict gesture and object sounds to this parcel. To restrict nearby voice chat to this parcel, select Restrict Voice to this parcel. Sound: Restrict gesture and object sounds to this parcel - Enabling this means an avatar needs to be on this parcel to hear gesture and object sounds originating from within it. This is useful if you have environmental ambience like birdsong and don't want to disturb the neighbors, or if you have an Adult-rated establishment and prefer that passerby don't hear sexually explicit noises. As cautioned above, maturity ratings take precedence. Avatar Sounds - By default, avatar sounds are not restricted, and the Everyone checkbox is selected. To permit sounds to be played byNo one: Clear both the Everyone and Group checkboxes. Group members only: Clear the Everyone checkbox, leaving Group selected. Voice Enable Voice - This is turned on by default and means people on this parcel can use voice chat to communicate. However, if voice is disabled at the estate level (in World > Region/Estate then clickEstate tab), this and Restrict Voice to this parcel will be grayed out. Restrict Voice to this parcel - Similar to Restrict gesture and object sounds to this parcel, enabling this prevents voice chat from being heard by avatars unless they are on this parcel. Good if you want to have a spatial voice chat in the open yet maintain some privacy.
  4. For a parcel of 16m*32 meters : * your chat range is a circle of 20*2 = 40 meters of diameter : your chat is over the boundaries of the parcel * even with llwhisper , you will be over the boundaries of the parcel So your problem is your chat , not your sensor To add, it s not realistic than every objects ( who needs to chat ) will be at the center of your parcel
  5. // TYPING :// * avoid useless changes // -- when the avatar is moving : because he can t type and move at the same time // -- when there is nobody neighbours : because when the avatar is alone he knows himself when he is typing// -- when the prim is shown and we want to show it// -- when the prim is hidden and we want to hide it// * avoids the flickering of the prim because the avatar starts to write some characters // and doesn t hit while 2-3 seconds// so we use a listener to show the prim until the avatar has not finished his message // Nevertheless it won t avoid the flickering when the avtar writes some characters , // and, next, looses his focus on the bar chat in clicking somewhere else// May be changed float T = 0.1; // time of frequency to check the typing state in seconds// Dont change belowfloat actualAlpha;integer listenHandler;integer lastState;// Shows the prim or hides itshowIf( integer boolean){ if ( boolean ) { if ( actualAlpha != 1.0 ) {// we show the prim and activates the listener to wait // a carriage return // we don t need anymore of the sensor llListenControl( listenHandler, TRUE); llSensorRemove(); llSetAlpha( actualAlpha = 1.0 , ALL_SIDES); } } else { if ( actualAlpha != 0.0 ) {// we hide the prim llSetAlpha( actualAlpha = 0.0 , ALL_SIDES); } }}// avoid to change the alpha of the prim when// - we wants to hide it , but it s already hidden// - we wants to show it , but it s already shownbufferedDisplay( integer actualState ){ if ( actualState != lastState ) { showIf ( actualState ); lastState = actualState; } } // When the prim is not attached , we show it : it avoids the avatar loose his prim // if the prim was invisibleinit(){ if ( !llGetAttached() ) { llSensorRemove(); showIf( lastState = TRUE); llOwnerSay("wear me.. i will be hidden.. type to unhide"); } else { llSensorRepeat("",NULL_KEY, AGENT, 20, PI, T); showIf( lastState = FALSE); } }default{ state_entry() { listenHandler = llListen(PUBLIC_CHANNEL, "", llGetOwner(),""); llListenControl( listenHandler, FALSE); init(); } on_rez(integer start) { init(); } attach(key id) { init(); } moving_start() { llSensorRemove(); } moving_end() { llSensorRepeat("",NULL_KEY, AGENT, 20, PI, T); } listen(integer c, string n, key k, string m) { showIf( FALSE); llListenControl( listenHandler, FALSE); llSensorRepeat("",NULL_KEY, AGENT, 20, PI, T); } sensor(integer n) { bufferedDisplay( llGetAgentInfo(llGetOwner()) & AGENT_TYPING ); }} There is no way to detect typing properly : if someone writes some characters on his chat bar , doesn t use return , clicks somewhere else, the viewer will send to the simulator than the agant has finished typing , but it s not true , because the avatar jas not finished his message. Nevertheless , you may use this script above .. It s already better than use a permanent timer, and to change the prim always
  6. No , there is no problem with sensor . Why do you read me badly ? It s your timer who has sevral problems you can t fix . You offer the solution of clipping . Firstly you may add a clipping test inside the sensor event and not in the timer event . And it will be better than your timer because your timer runs every time without condition . With your timer you will do continuously and permenently some clipping tests . With a sensor , it will do only to prevent wrong positives, so not every time. If there are only negatives , it won t run . Less events triggered , less clipping tests done , so less load . Secondly : you clip by llovermyland . but llovermyland is a costly function : you may do better when you know than you can grab the border/limits of the parcel at the state_entry once and only once . Finally your clipping in the sensor will be the same that clipping something inside a cuboid , so very fast without calls to some LSL functions Thirdly , why to do a clipping test : i repeat : may you do a clipping chat ? Not by llSay neither llWhisper . Your local chat will have always the shape of sphere and not a cuboid . In fact there is no reason to clip inside the timer because there is no clipping chat possible Thats why i have posted the pictures of the shape of parcels , because , by evidence , it s absurd to make some tests based on the shape of the parcel when you know that the chat shape is a sphere ( or its projection on the ground plane a circle ) And It s because to show you , that even with llgetagentlist , you will talk to neighbours , whatever your code , because your chat shape is a sphere , not the shape of the parcel . So it s an useless test Your instance of club has no link with the topic : In your club you want to detect every avatar .And it will fail to detect more than 16 avatarsI If there are 2avatars it will work , if there are 23 avatars it will fail . And giving anaimations to your neighbours avatars can be done outside the chat range . It s a different job of the script in this thread : the OP wants to detect zero avatar or more than 0 . No matter if there are 23 avatars or 2 avatars , because the script should chat in the two cases
  7. a script inside an object can t delete an another object . But a script inside an object can delete explicetly the object who contains it : the function is llDie . llDie http://wiki.secondlife.com/wiki/Lldie There is an exception : if you have manager rights , you may return an object . But it will fill quickly your inventory ( the objects are saved as copy in your inventory ) llReturnObjectsByID http://wiki.secondlife.com/wiki/LlReturnObjectsByID Note you may too create your rezzed object as TEMP object before to put it in the content of the rezzer object : but it will be deleted after some time ( generally one minute after you have set it at the temp ; rezzing or derezzing the temp object dosn t change the lifetime of the temp object . it won t restart the lifeteime at 1 minute if you rez - unrez - rez ) But it s not explicetly If you have not the manager rights or if you don t want use it , you will need that the rezzer sends an event who will be recived by the rezzed object . The event in the rezzed object will call lldie to delete itself. Generally , the kind of events are messages , but it can be something else
  8. Your logic is wrong : because if a scripter may change the range of the sensor to avoid detecting people outside of the parcel , the scripter couldn t change the range of llsay or llwhisper . So even with a timer + llgeteangentlist , people outside of your parcel will hear your chat you have a pacel of 4*4 .. easy to make a sensor of 2 meters range centered in the parcel who detects only objects inside the parcel : it detects not the whole parcel but it doesn overlap the neighbours client . But your llsay ( or even your llwhisper ) will be heard in a spherus of 40 meter of diameter independtly if you have chosen sensor or timer The volume where llsay will be heard is unchanged by the position of rhe detected item/avatar. So with llgetenaglist , it s worst : because you detect an avatar for instance at high altitudes when your script is in the ground , it will talk to the neighbours of your region a message who won t interest them Definitevly no . timer + llgetagentlist is not an option for the case of the OP If you want to avoid to talk to eighbours , the only solution is to avoid that your objet is too close of the border , or worst at the corner ) of your parcel N To add , testing if an avatar is in your parcel gives often wrong positives : Let s see for instance this sim : http://maps.secondlife.com/secondlife/Rossa/137/177/53  This picture represent the different parcels of the sim : each color represent one parcel . You see that majority of parcels are rectangles and not squares . And you have even some parcels who are not regular shapes : Look for instance the parcel in the shape of F in red . Or more common the parcel in a shape of stairs in drak green , or in yello , or in blue at the bottom right It s not an adition of my part , it s like this the parcel has been built . When you know that the range chat is a sphere ( or its projection on a surface is a circle ) , you see you will get always wrong positives in checking if one avatar is in the parcel An another instance of sim 
  9. Your object is at < 128, 128, 30> and there is an avatar who is at <128, 128, 4000> : - the avatar is on your parcel . - but he is totally outside of the range of the llSay . The volume in range llWhisper = 4/3 * Pi * r*r*r = 4 189 meters cube llSay = 4/3 * Pi * r*r*r = 33 3510 meters cube llgetangentlist for a parcel of 32*32meters footprint = 32* 32 * 4096 = 4 194 304 meters cube . It s not the worst case for timer/llgetagentlist : your parcel could be non-squared and give worst results So , no : in the case of OP who needs to talk only in a chat range , and not to everybody in the parcel , timer + lllGetAgentList is a VERY worst solution than llSensor A small parcel , is small only in surface , not in volume . ========================================== For the call to dataserver Qie wrote : Finally, specifically to this case, if the notecard isn't that huge, by far the greatest efficiency win would be to read the whole thing into one long list of strings, once, so the script never needs to see a dataserver event until reset by the CHANGED_INVENTORY of a new notecard. The approach does use some memory, but it's been years now since memory has been a common problem in even the busiest sims.totally agree with this point .
  10. Your book has been written several years ago , at time when llgetagegentlist didn t exeist . at time too when some functions to monitor and mesaure teh scripts didn t exist neither at time too when the compiler mono was not well established... So it can t be a reference for performances To add, i have nor readen it , but i am sure that this book talks about timers ,and it didn t told that the timers were free-lag. And last point : has it talked about sensors when it detects some objects ( so max15000 present in the sim , and so an high probability to be triggered ) or when it detects avatars ( so max 100 in the sim, 40 max in the mainland , and a few probability to be triggered in comparing ) ?? The probability is totally different JUST USE YOUR LOGIC !!! When you code some stuff who will be executed 100 times in one script , and exactly the same stuff who will be executed 50 times in one another script , which one is the laggest ??? This is exacly what you do ith a timer in the case of the OP ( of this thread ) : The code you have written inside the timer will run every 60 seconds , without condition , when the code code you have written inside the sensor won t run every 60 seconds : if there is nobody in range , the sensor is not triggered and doesn t run .. Point ! Nobody is always connected to SL : with a timer your script will run 24hours/24hours , 7 days/ 7days , even if there is nobody at the chat range , even when there is nobody in the same parcel , and even when there is nobody in the sim . With a sensor it will run only when there are people nearby Of course , if your script codes at the same time sensor() ( triggered only when someone is nearby ) and no_sensor() ( triggered only when nobody is nearby ), your events will be always triggered , as a timer , and you may replace it with a timer . But it s not the case of the OP . He needs only one type of event . It s worst to use llgetagentlist in this case : what does the OP : he wants to chat in a range of 20 meters with llsay .. Why should he grab the keys of avatars ? If he did this , he did useless and consuming work . Why should he detect the avatars who are outside of the 20 meters range .. In the case of OP , the OP doesn t care about the informations about avatars : the ony thing interesting for his script is "is there someone nearby" , because it s useless and consuming work to send messages , even when there are nobody to receive the messages You increase the work of the script in doing this . Your version with llgetagentlist will be totally innefficient in comparing.
  11. No , my sensor doesn t trigger every 60 seconds .. You make a mess between the 1 ) test of the simulator to know which event should be trigerred ( some code written by Linden in C++ and who runs fast ) 2 ) and the execution of the trigerred event ., ( the code written by yourself in LSL who runs slow ) + the execution to "load" the event ( written by Linden ) If you set a timer of 60 seconds : the first part is always executed :: the simulator needs to make a test if 60 seconds are elapsed when 60 seconds are elapsed , the second part ( the code written by yourself ) is always executed If you set a llsensorrepeat of 60 seconds : the first part is always executed :: the simulator needs to make a test if 60 seconds are elapsed , and needs to detect if an avatar is in range when 60 seconds are elapsed , the second part ( the code written by yourself ) is not always executed Of course the first part of the llsensorrepeat consumes more CPU than the the first part of the timer. But the second part of the llesensorrepeat will consume less CPU than the second part of the timer . And the second part will be considerably slower than the difference of time in the first part between sensorrepeat and ttimer Indeed , there is probably a save of states of variables ( on the disk ) , there is the load in memory of the script ( may cause too a disk operation ) ., the resume of o thread paused , the compilation JIT of the methode/event if it s the first time it runs , the cleanup of the memory with garbage collector and a lot of other stuff and finally your code .
  12. In this case , it s maybe preferable to use a sensorrepeat . Because your script ( if you use a timer ) will try to speak even when there is nobody at the range and so triggers some events for nothing. For instance if you have the script inside a skybox , and people are in other skybox or at the ground , using a timer will continue to run when it s not expected. If you use a sensorrepeat , some events will be triggered only if there are some people , and every 60 seconds . It s when the sensor is triggered , there is the request of a new line : It s when the datserver is triggered , there is the display of message . string card = "";key linecountid;key lineid;integer linemax;integer random_integer( integer min, integer max ){ return min + (integer)( llFrand( max - min + 1 ) );}float timePeriod = 60.0;default{ state_entry() { card = llGetInventoryName(INVENTORY_NOTECARD, 0); if ( card != "" ) { linecountid = llGetNumberOfNotecardLines(card); } else { llOwnerSay("No notecards in the inventory"); } llPlaySound("953d8b35-cdae-f316-92f6-92bf3c2264e1",0.02); llSleep(2.0); } sensor(integer n) { lineid = llGetNotecardLine(card, random_integer(0, linemax)); } dataserver(key id, string data) { if (id == linecountid) { linemax = (integer)data - 1; if ( linemax > 0 ) { llSensorRepeat("", NULL_KEY, AGENT, 20, PI, timePeriod); } else { llOwnerSay("Notecard ["+ card +"] is empty , or has no rights , or contains embedded datas ( textures, LM etc )\nReplace it "); } } else if (id == lineid) { llSay( 0, data ); } } changed(integer c) { if ( c & CHANGED_INVENTORY ) { llSensorRemove(); card = llGetInventoryName(INVENTORY_NOTECARD, 0); if ( card != "" ) { linecountid = llGetNumberOfNotecardLines(card); } else { llOwnerSay("No notecards in the inventory"); } } }}
  13. When you want to move an object the first question is "in which coordinate system , i am ?" You write MyOffset = Pos - ParentPos; So, MyOffset is the position of the object B relatively to the object A but in which coordinate system : in the coordinate system where the origine is A ( and described by ParentPos ) and the axis of the frame of refrence are again the regional axis But as you will move later your rezzer ( object A ) and rotates it , and your rezzer had too a rotation mayb e not null , you want , in fact , the position of the object B relatively to the object A in this following coordinate system : object a ( the rezzer ) is the point of origine of the coordinate system : the axis of the object A are the axis of the coordinate system So you need to fix your formula when you record your coordinates : MyOffset = Pos - ParentPos; by MyOffset = ( Pos - ParentPos ) / ParentRot ; where ParentRot is the rotation of the rezzer Your script should be something like : /when position & rotation are recordedlist x=llGetPrimitiveParams([PRIM_POSITION,PRIM_ROTATION]);rotation ParentRot = llList2Rot( llGetObjectDetails(ParentKey,[OBJECT_ROT]), 0);Pos=llList2Vector(x,0);MyRot=llList2Rot(x,1);MyOffset=(Pos -ParentPos)/ParentRot;//when rezzedlist x=llGetObjectDetails(ParentKey,[OBJECT_ROT]);ParentRot=llList2Rot(x,0);llSetRegionPos(llGetPos()+MyOffset*ParentRot);llSetRot(ParentRot); Is it celar and do you understant better , or should i give more details or an instance ?
  14. I see in your psate , you have written your rotations with 6 digits . When you convert a string to rotation , the precision of 6 digits are not enough . Your result quaternions won t be normalized ; if you manipulate your unnormalized rotations with other LSL functions, you could meet some issues So , - either after reading your strings containing the rotations , you normalize the rotation rotation NormRot(rotation Q){ float MagQ = llSqrt(Q.x*Q.x + Q.y*Q.y +Q.z*Q.z + Q.s*Q.s); return <Q.x/MagQ, Q.y/MagQ, Q.z/MagQ, Q.s/MagQ>;} - either you use in your string a precision for rotations of 8 digits . - either you use in your string , some rotations written in C99 float format
  15. For me i don t see any mathematics : scalebyfactor is in fact an homothetie with center , the center of the root prim . So : - it lets invariant the rotations centered on the root prim ; your rotations returned by PRIM_ROT_LOCAL before the call of scalebyfactor don t need to be changed after scalebyfactor - it scales the transformations uniformely in the frame with center the root prim ; so if you have scaled with scalebyfactor by X , your posistions of your child prims returned by PRIM_POS_LOCAL before the call of scalebyfactor need to be multiplied by X after scalebyfactor - for the same reason , rotations and translations in coordinates region ( so with a center who doesn t match with the center of the root prim ) should be avoided ( PRIM_POS , PRIM_ROTATION ) because the centers of coordinates are different , so the composition of transformations ( translation + rotation + homothetie ) may be complex For instance OriginalPosandRot(){ llSetLinkPrimitiveParamsFast(2,[ PRIM_POS_LOCAL,<0.06420, -0.13936, 0.02051>, PRIM_ROT_LOCAL,<0.97959, 0.19486, -0.04837, -0.00959> ]); llSetLinkPrimitiveParamsFast(3,[ PRIM_POS_LOCAL,<-0.04510, 0.12622, 0.03101>, PRIM_ROT_LOCAL,<0.69950, 0.17172, 0.10364, 0.68590> ]); } You scale the object by scalefactor = 3 Your object will have the new coordinates : child 2 : PRIM_POS_LOCAL = 3 * <0.06420, -0.13936, 0.02051> PRIM_ROT_LOCAL = <0.97959, 0.19486, -0.04837, -0.00959> child 3 : PRIM_POS_LOCAL = 3 * <-0.04510, 0.12622, 0.03101> PRIM_ROT_LOCAL = <0.69950, 0.17172, 0.10364, 0.68590>
  16. You may try this one :matte-motes-grin: around 39 seconds. default{ touch_end(integer total_number) { llPlaySound("8a447571-faf8-5df5-8db2-e53c198451c8", 1.0); }}
  17. You can play sounds by UUID and have no need to put the sounds in the content of the prim ( if you have the correct perms ) **edit** Ok .. rofl .. it looks there are some people who have hacked their viewer to import long wavs . Indeed , i have some sounds of 40 seconds in my cache . By the way , it s not a script solution ; it s while the import : ask to those who have hacked their viewer
  18. For the system , nobody knows . ( so maybe it may make more work for the garbage collector ?) For the memory counted by Linden to know if your script will reach heap collision error , definitevely no. integer memory0; integer memory1; integer n; key f() { key result; n=2000; memory0 = llGetUsedMemory(); key mykey0 = llGenerateKey(); do { mykey0 = llGenerateKey(); } while ( --n ); memory1 = llGetUsedMemory(); llOwnerSay(llList2CSV(["mem f used",memory1-memory0])); } key g() { // in this function , we declare a key , so 36 chars = 72 bytes // inside the loop . // If we had a new allocation at each step , we would get 72 bytes * 2000 steps // = 144 000 bytes used // But the script doesn t crash for heap memory . // So : // - either the memory is allocated in th system but not counted by Linden // but it s not counted , the garbage collector could have work on 144000 bytes // - either the variable inside the loop is reused ( optimization by compiler ) n=2000; memory0 = llGetUsedMemory(); do { key mykey1 = llGenerateKey(); } while ( --n ); memory1 = llGetUsedMemory(); llOwnerSay(llList2CSV(["mem g used",memory1-memory0])); } default { touch_end(integer total_number) { f(); g(); } }
  19. // by Nitewind Armistice // License GNU/BSD // Feel free to use and modify // Keep the authors/ modifiers references included // NOT FOR SALE! list main_menu = ["Upper", "Lower"]; // Main menu list Pants_menu = ["Foot", "Full Body", "None", "Panties", "Shorts", "Thighs", "Toes"]; // Sub-Menu for Lower list Shirt_menu = ["Long Sleeve", "TShirt", "None"]; // Sub-Menu for Upper integer listen_channel = -123456; // Channel that you script will listen on make sure it is not a public channel and // set the same in the other scripts that you are using with the hud integer handle; default { on_rez(integer start_param) { // rests the script when rezzed llResetScript(); } changed(integer change) { // reset script when the owner or the inventory changed if (change & (CHANGED_OWNER | CHANGED_INVENTORY)) llResetScript(); } state_entry() { handle = llListen(listen_channel,"",llGetOwner(),""); // only listens for the owner of the item that this // script is in llListenControl(handle,FALSE); } touch_start(integer total_number) { llListenControl(handle,TRUE); // open listen handler to listen for any of the buttons that are touched llSetTimerEvent(30.0); // set that time for the listen handler is open to be used it is done in seconds llDialog(llDetectedKey(0),"Try a selection...", main_menu, listen_channel); } listen(integer channel, string name, key id, string message) { if (message == "Lower") // if the Pant button is pressed it will goto the sub-menu pants { llDialog(id,message + " Dialog", Pants_menu, listen_channel); } if (message == "Upper") // if the Pant button is pressed it will goto the sub-menu shirt { llDialog(id,message + " Dialog", Shirt_menu, listen_channel); } if (message == "Back") // this is listneing for the button to be pushed it will go back to the main menu { llDialog(id,message + " Dialog", main_menu, listen_channel); } } timer() { llSetTimerEvent(0.0); // sets timer to 0.0 second llOwnerSay("You waited too long to pick, resetting menu."); // message owner this message when 30 seconds is up llListenControl(handle,FALSE); // shuts off listening handler where they will have to touch the hud again to // get the menu } } // End Script
  20. I am not sure to understand correctly the problem ; For me , the main problem is that the rotation is at 0.2 degrees per frame . So it s not sure the computing is correct because the cosinus of the half-angle of rotation is very closed 1 to and may , in some frames , rounded to 1 ( 1 = no rotation ) , if the program rounds too much the floats Actually , it s so bugged , than even when i try to rotate to 20 degrees per seconds ( 0.4 degrees per frame ) , the rotation is either jerked either totally stopped . In the past , i was meeting some issues only under 9 degrees per seconds . I have turned on the option "developper/show info / show update objects ( control+alt+shift+u) and i see that the simulator doesn t often update the viewer . Sometimes the omega returned by the simulator is 0 . The viewer is thinking that the roattion has finished . but some seconds later , the rotation is resuming its run But if there is a problem with the center of mass , changing the gravity of the object to 0 will fix the issue ? I can t believe second life has so many bugs about rotations after 12 years ....
  21. Hi rollig . By luck , are you informed or have you some details why , by design, llRequestExperiencePermissions won t catch PERMISSION_OVERRIDE_ANIMATIONS Is it by lack of time for the developers to implent this or does this permission cause some conflict with something else ?
  22. Give up this function . It s totally and completely useless Your "experienced scripters" are only noobs
  23. Dudes !! Use BITS !!! Your data structure should be a set . Inegers can be a set if you manipulate the binary bits . a single integer can represent a set of 32 values . It s more than 15 prices . And you can use several integers of course. It will less costly than using a list To check if some prices are owned , you need only a "&" bit-operator Example /*PARAMS:arrayPrices : a set of prices stored as bit. numberPrice : number of price in decimal to set RETURN :TRUE arrayPrices modified in setting numberPriceexample : arrayPrices = 5 in decimal , so 101 in binaryit means the price #1 and the price #3 are ownedsetPriceOwned(5, 2) = 111 in binary , so 7 in decimalit will mean the price #1 and the price #2 and the price #3 are owned*/integer setPriceOwned( integer arrayPrices, integer numberPrice ){ numberPrice--; return arrayPrices | ( 1 << numberPrice ); }/*PARAMS:arrayPrices : a set of prices stored as bit. numberPrice : number of price in decimal is checkedRETURN :TRUE if price # numberPrice is owned in the arrayPricesexample : arrayPrices = 5 in decimal , so 101 in binaryit means the price #1 the price #3 are ownedisPriceOwned(5, 1 ) = TRUEisPriceOwned(5, 2 ) = FALSEisPriceOwned(5, 3 ) = TRUE*/integer isPriceOwned( integer arrayPrices, integer numberPrice ){ numberPrice--; return ( arrayPrices & ( 1 << numberPrice ) ) != 0;}/*PARAMS:arrayPrices : a set of prices stored as bit. maxPrices : number of the firsts prices are checkedRETURN :TRUE if ALL the maxPrices first prices are owned in the arrayPricesexample : arrayPrices = 7 in decimal , so 111 in binaryit means the price #1 and the price #2 and the price #3 are ownedallFistsPricesOwned(7, 3 ) = TRUEFALSE if notexample :arrayPrices = 5 in decimal , so 101 in binaryit means the price #1 and the price #3 are ownedallFistsPricesOwned(5, 3 ) = FALSE*/integer allFistsPricesOwned(integer arrayPrices, integer maxPrices){ integer mask = ( 1 << (maxPrices-1) ) -1; return (arrayPrices & mask ) == mask;}/*PARAMS:arrayPrices : a set of prices stored as bit. RETURN :a list of prices owned . The value in the list is in the decimal and means the nth price */list getListPricesOwned( integer arrayPrices ){ integer price = 1; integer number = 1; list output; while ( price <= arrayPrices ) { if ( price & arrayPrices ) { output += number ; } price = price << 1; number++; } return output;}default{ touch_end(integer n) { integer t ; t=setPriceOwned(t,2); // adding the price #2 t=setPriceOwned(t,4); // adding the price #4 t=setPriceOwned(t,5); // adding the price #5 t=setPriceOwned(t,1); // adding the price #1 if ( isPriceOwned(t,3) ) { llOwnerSay("price number 3 is owned");} else { llOwnerSay("price number 3 is not owned");} if ( isPriceOwned(t,4) ) { llOwnerSay("price number 4 is owned");} else { llOwnerSay("price number 4 is not owned");} if ( isPriceOwned(t,5) ) { llOwnerSay("price number 4 is owned");} else { llOwnerSay("price number 5 is not owned");} if ( allFistsPricesOwned(t, 2 ) ) { llOwnerSay("prices from 1 to 2 are ALL owned") ;} else { llOwnerSay("some of prices from 1 to 2 are not owned") ;} if ( allFistsPricesOwned(t, 5 ) ) { llOwnerSay("prices from 1 to 5 are ALL owned") ;} else { llOwnerSay("some of prices from 1 to 5 are not owned") ;} llOwnerSay( llList2CSV( [ "list prices owned =" ] + getListPricesOwned(t) )); }}
  24. You don t get enough authorization for some of your textures. ( some of them are , for instance , no transfer for you ) Even when you fill the UUID , you need some rights on the textures . Or some UUIDs are wrong
  25. your positions defined in ll(link)sittarget are probably wrong . ARe you sure to use local positions in parameters of ll(link)sittarget ? It s impossible to get 2 avatars on the same prim . Probably the defined positions are erroneous and points to the same position
×
×
  • Create New...