Jump to content

VirtualKitten

Resident
  • Posts

    916
  • Joined

  • Last visited

Everything posted by VirtualKitten

  1. Um @Qie NiangaoYour GetNotecard does not seem do the same thing I really don't understand what you mean by that am i missing something as yours does not compile the lines to a list at all. I am unsure why "[" and/or "]" would be troublesome as his is grammatical in English language . A simple search did not throw up any exceptions of using the "[" and/or "]" characters.
  2. @DoteDote EdisonAlthough this is true of llListFindList() it is not true of as a partial find as of the code I supplied as two of the lists would need to be checked as partial matches may not be found. Hope this clarifies?
  3. Thanks @Mollymewsthat's quite interesting however it talks about energy, the object loses energy, energy as the energy is reduced by llPushObject . This makes no sense as the magnitude of the force is applied into llPushObject, as I said the the llSetForce( or llApplyImpulse( and llSetForceAndTorque( might be of use but why does walking the avatar away from the object in the script in it magnify this energy into the system. I would expect repeated calls of llPushObject(llDetectedKey(0),iForceVec,<0.0,0.0,0.0>,TRUE); to force the energy onto the detected key . I understand this may loose energy but why when an initial force unrealistically to the push detected key away then when the detected key walk away why does it apply this new energy force in the circle, which I was trying to exert force in the first place but some meters away because my avatar introduced different energy of walking in an entirely separate area? Is this supposed to be intentionally as it looks like the force of energy drop of is to fast . Is there anything to control this energy drop of curve please? Thanks Denise
  4. @Qie Niangao Thanks for your message and your offer to help. You have the script above for playing which fails i believe because of naming expectation in PlaySound and Preload which only seems to function with sequential sound names sound-01 ... sound -10. It cannot seem to work were sound [067]-01 or sound -01 [0607] is used as name either sound [067]-01,sound [057]-02, sound[038]-03 ... sound[026]-10 or .either sound-01 [067],sound -02 [057], sound-03 [038] ... sound-10 [026] only sound-01 , sound-02, sound-03 ... sound-10. Seems to work well but you cannot add anything to the song names to store data . I was left to try load this is in note card. The note code routines are standard I my code and have not failed before : Code: note_card_finished(string card) { //So next card or something with data if(card =="") llOwnerSay("No Card Loaded"); llOwnerSay("1 of 1 Reading .." + card); if(card == "songs_bpm") { bpmList = gCard_Lines_Temp; gCard_Lines_Temp =[]; } } GetNotecard(string notecard, integer notify) // Get the notecard's name, if present { gStrNotecard = ""; iLine = 0; integer iNoteLine = 0; kQuery = NULL_KEY; // llOwnerSay("Reading Notecard: " + notecard); integer intNoteCount = llGetInventoryNumber(INVENTORY_NOTECARD); // Check if there is a notecard to begin with if (intNoteCount) { iNoteLine=-1; do gStrNotecard = llGetInventoryName(INVENTORY_NOTECARD, iNoteLine ++); while((gStrNotecard != notecard) && iNoteLine <= intNoteCount); if(_debug) llOwnerSay("(DEBUG) Line Count "+ (string)iNoteLine + ", NoteCard Name '" + gStrNotecard + "' @ line: "+(string)iLine); kQuery = llGetNotecardLine(notecard ,iLine); } else llOwnerSay("NOTECARD NOT FOUND: " + notecard); } default() { state_entry() { gCard_Lines_Temp=[]; GetNotecard("songs_bpm", TRUE); } dataserver(key _QueryId, string _data) { if(_QueryId == owner_name_query ) { // if(_debug) llOwnerSay(response); owner_display_name = _data; } if( kQuery == NULL_KEY) llOwnerSay("The Notecard '" + gStrNotecard + "' Could not be read . This could be beacuse of privaliges."); if(_QueryId == kQuery) { if(_data != EOF) { if ((llGetSubString(_data, 0, 1) != "!#") || (_data == "")) // Check if the line should be skipped { integer hashIndex = llSubStringIndex(_data,"#")+1; integer length = llStringLength(_data)-1; gCard_Lines_Temp += llGetSubString(_data,hashIndex,length); /*if(_debug )*/llOwnerSay("(DEBUG) Line : " + (string)iLine + ", DATA " +llGetSubString(_data,hashIndex,length)); } ++iLine; // Increment the line no. kQuery = llGetNotecardLine(gStrNotecard ,iLine); } else { if(_debug )llOwnerSay("(DEBUG) End of notecard '" + gStrNotecard +"' reached. "+ (string)iLine + " items read..."); note_card_finished(gStrNotecard); return; // Nothing more to be done; exit the event } } } }
  5. I placed a check on it and it stopped after 15 giving the error . It was llownersay each line it obtained printing it to screen. There is no difference in the note card lines as the notecard was calculated by a computer system MixMister to obtain BPM and exported by txt . This was taken into MS Excel to remove the columns not required and saved as tab delimited text . Line 15 is no different to line in front of it so am I am clueless why it fails.
  6. @Andrew LindenThe PushObject api is very odd in its behavior I was told by my Collège that this system was good enough to push a person in LSL . It seems to manifest odd behavior . To Observe this you must remove huds . Once removed the activation can be a touch or a collision I used the latter. as below in code. The result was to use alot of energy in one mass to move you away . I expected this but the continual call to PushObject did not use the same magnitude as the original even though it was still applied. It seems that the only force added to this component is a walking direction force . If this is added to the push by way of moving the avatar it pushes with the correct energy to complete a circle . I hve only looked at push Object so far and am aware other API. if I am distant from the collided object why does my walking affect this api and running code . If the same magnitude is being supplied surely this should be evident . The havoc code talkes about what force is available to the push surely this is a combination of the magnitude . I have not tried llSetForce( or llApplyImpulse( vector momentum, integer local ) and llSetForceAndTorque( vector force, vector torque, integer local ); which need llSetStatus(STATUS_PHYSICS, TRUE); I can post a video of this if it helps however i am pretty sure with this snippet you can see this for yourself. I would be grateful of any help or clarity you can give. Thank you D. Code: rotation rot3ToQuat(vector deg) { return(llEuler2Rot(deg*DEG_TO_RAD)); } default { collision_start(integer num_detected) { integer count= 360; float iv = 20.0; // interval in degrees each cycle float magnitude = 255.0; vector i3rot = ZERO_VECTOR; // Starting rotation in degrees XYZ. vector origin = llGetPos(); // Take this to be the circle origin, for the sake of example. vector iForceVec; while(count--) { i3rot.z += iv; if(i3rot.z >= 360.0) i3rot.z = 0.0; iForceVec = <magnitude,0.0,0.0>*rot3ToQuat(i3rot-<0.0,0.0,90.0>); // for demo purposes only. llSetText((string)i3rot + "\nForce: " + (string)iForceVec + "\nMag: " + (string)llVecMag(iForceVec),<1.0,1.0,1.0>,1.0); llPushObject(llDetectedKey(0),iForceVec,<0.0,0.0,0.0>,TRUE); llSleep(.2); } } }
  7. rotation rot3ToQuat(vector deg) { return(llEuler2Rot(deg*DEG_TO_RAD)); } default { state_entry() { float iv = 10.0; // interval in degrees each cycle float magnitude = 155.0; vector i3rot = ZERO_VECTOR; // Starting rotation in degrees XYZ. vector origin = llGetPos(); // Take this to be the circle origin, for the sake of example. vector iForceVec; while(1) { i3rot.z += iv; if(i3rot.z >= 360.0) i3rot.z = 0.0; iForceVec = <magnitude,0.0,0.0>*rot3ToQuat(i3rot-<0.0,0.0,90.0>); // for demo purposes only. llSetText((string)i3rot + "\nForce: " + (string)iForceVec + "\nMag: " + (string)llVecMag(iForceVec),<1.0,1.0,1.0>,1.0); llPushObject((key)"my key",iForceVec,<0.0,0.0,0.0>,FALSE); llSleep(1.0); } } And it shows magnitude fall
  8. Well i had some help from my college and we think the calculations are correct but this still doesn't get you in a circle. The calculations are correct but it pushes in a straight line its not perfect as it has an infinite loop for testing. I am sure someone cleaver out there can say why it doesn't and how to get it going ? Thanks Tenso for your help with this rotation rot3ToQuat(vector deg) { return(llEuler2Rot(deg*DEG_TO_RAD)); } default { state_entry() { } touch_start(integer total_number) { llMessageLinked(LINK_THIS,0,(string)llGetDisplayName(llDetectedKey(0)),llDetectedKey(0)); } link_message(integer sender, integer num, string str, key intruder_key) { if (llGetAgentSize(intruder_key) == <0.0,0.0,0.0>) return; list tmp = llParseString2List(str,["|"],[]); string intruder_name = llList2String(tmp,0); //llGetSubString(str, 0, llSubStringIndex(str,"|") - 1); vector pos = (vector)llList2String(tmp,1); vector target_relative_direction; float push = .010; target_relative_direction = pos - llGetPos(); vector target_normalised_vector = llVecNorm(target_relative_direction); string action = "Push"; llOwnerSay((string)target_normalised_vector+", and llGetPos"+(string)target_relative_direction); llPushObject( intruder_key, ((push/100.0)*2147483647)*target_normalised_vector, <0.0,0.0,0.0>, FALSE ); // push away from box .3 to make box a centre then we have a diameter of .3 // we know we want to move around the cirumferance so we need and angle of movement and // to get oposite sin (theta) = opposite / hypotinuse or diameter. // new movement float iv = 10.0; // interval in degrees each cycle vector iRot3d = ZERO_VECTOR; // Starting rotation in degrees XYZ. vector origin = llGetPos(); // Take this to be the circle origin, for the sake of example. vector ipos; rotation irot; while(1) { iRot3d.z += iv; if(iRot3d.z >= 360.0) {iRot3d.z = 0.0; return;} // for demo purposes only. llSetText((string)iRot3d,<1.0,1.0,1.0>,1.0); float magnitude = .1; irot = llEuler2Rot(iRot3d*DEG_TO_RAD); ipos = llGetPos()+(<0.3,0.0,0.0>*irot); vector iForceVec = <magnitude,0.0,0.0>*rot3ToQuat(<0.0,0.0,iRot3d.z-90.0>); llPushObject( intruder_key,iForceVec,<0.0,0.0,0.0>, FALSE ); //llSetLinkPrimitiveParamsFast(0,[PRIM_POSITION,ipos]); } } }
  9. You can add JSON constructs to lists to give you the same as a multi array. You said you want to compare lists against other lists is this all you are trying to do llListFindList will find a list item in a list if its an exact match you will have to parse one list with two others and then second with third. If its a partial match then you need a script: //************************************ CORE ROUTINES BELOW WERE LSL LACKS FUNCTIONS **Virtual Kitten integer _contains(string haystack, string needle) { return ~llSubStringIndex(haystack, needle); } integer _llStringPartialFindList(list list_1, string string_1) { integer s1 = llGetListLength(list_1); integer s2 = llGetListLength(list_1); integer n; for(n=0;n<s2;n++) { if (_contains(llList2String(list_1,n) ,string_1)!=0) return n; } return -1; }
  10. @Rolig Loon I did try your script in what it created too it failed too even though I altered the size of array :
  11. There is a nifty script I found to deal with these sort of issues of deeding objects .I have this called .deededTools in my objects I deed and cant remember who wrote it please give credit if you know but its very useful as it no longer shows the creator integer CHANNEL = 1; key gGhostPrim; default { state_entry() { llListen(CHANNEL,"",llGetCreator(),""); llInstantMessage(llGetCreator(),"For help, type: /" + (string)CHANNEL + llGetObjectName() + " help\n"); } listen(integer channel, string name, key id, string msg) { string name = llToLower(llGetObjectName()); if( llSubStringIndex(llToLower(msg),name) != 0) return; msg = llStringTrim(llGetSubString(msg,llStringLength(name),-1),STRING_TRIM); list params = llParseString2List(msg,[" "],[]); string command = llToLower(llList2String(params,0)); string param = llDumpList2String(llDeleteSubList(params,0,0)," "); params = []; if( command == "help" ) { llInstantMessage(id,"\nSyntax: /"+ (string)CHANNEL + llGetObjectName() + " <command> <params>\n\n" + "kill: Kills the object\n" + "ghost <name/UUID>: Follow the object and rotate along with in\n" + "unghost: Stop following an object\n" + "pin #: Sets script loading pin to <#>\n" + "unpin: Removes loading script pin" ); llInstantMessage(id,"\n"+ "drop: Allows objects to be dropped into the prim\n" + "undrop: Prevents objects from being dropped into the prim\n" + "reset <script>: Resets the script named <script>\n" + "run <script>: Starts the script named <script>\n" + "stop <script>: Stopts the script named <script>" ); } else if( command == "kill" ) { llInstantMessage(id,"Killing " + llGetObjectName() ); llDie(); } else if( command == "move" || command == "rmove") { vector p = (vector)param; if( command == "rmove" ) p += llGetPos(); if( llVecMag( p - llGetPos() ) > 100 ) { llInstantMessage(id,"Unable to move: Distance is too great"); return; } while( llGetPos() != p ) {llSetPos(p);} } else if( command == "rot" || command == "rrot" ) { rotation r = llEuler2Rot((vector)param*DEG_TO_RAD); if( command == "rrot" ) r = llGetRot() * r; llSetRot(r); } else if( command == "pin" ) { llSetRemoteScriptAccessPin((integer)param); } else if( command == "unpin" ) { llSetRemoteScriptAccessPin(0); } else if( command == "drop" ) llAllowInventoryDrop(TRUE); else if( command == "undrop") llAllowInventoryDrop(FALSE); else if( command == "reset" ) llResetOtherScript(param); else if( command == "run" ) llSetScriptState(param,TRUE); else if( command == "stop") llSetScriptState(param,FALSE); else if(command == "remove") { if( llGetInventoryType(param) != INVENTORY_NONE) { llRemoveInventory(param); } } else if( command == "ghost" ) { gGhostPrim = param; if( llGetOwnerKey(param) == NULL_KEY ) { llSensor(gGhostPrim,"",ACTIVE|PASSIVE,20.0,PI); } else { llSetTimerEvent(1.0); } } else if( command == "unghost" ) { llSetTimerEvent(0.0); } } sensor(integer i) { gGhostPrim = llDetectedKey(0); llSetTimerEvent(1.0); } no_sensor() { llInstantMessage(llGetCreator(),(string)gGhostPrim + " not found"); } timer() { list p = llGetObjectDetails(gGhostPrim,[OBJECT_POS,OBJECT_ROT]); if( llGetListLength(p) == 0 ) { llSetTimerEvent(0.0); llInstantMessage(llGetCreator(),"Object Lost.."); } else { llSetPos(llList2Vector(p,0)); llSetRot(llList2Rot(p,1)); } } }
  12. Will all the other parts of the external HTTP Request operators function as they did on non cloud based services or will they need rewrite to run with cloud ?. Can you please let me know if some of the other submitted changes on jira have been concidered like opening a stream to pass information in its song headers ?
  13. @Fritigern Gothly no its nothing like it now as I had to take the process much further the script is mono
  14. I have items that use httpRequest but cant get to beta test grid sorry to say it hast worked in a long while . It like many leave me in an area I cant tp out off. It still works ok in world and has not broken yet. https://marketplace.secondlife.com/p/MP3-Song-Art-Display/19814226
  15. not by simply uploading the gif and dropping it onto a face . You will need the frames from the gif and construct a matrix of them of known size this can be done in a paint program like Gimp easily . You then need a script to play this on a face . The size of your image has a dramatic affect on performance. You can also use this program https://www.outworldz.com/Secondlife/Posts/Gif/Create-Gif-in-Second-Life.htm but you will still need a script that uses http://wiki.secondlife.com/wiki/LlSetTextureAnim
  16. @By ItHadToComeToThis, Really I have to say in any security installation you should not be passing a password in any form across a network. You should only be passing data created by this password. You should also using more than to passwords to create a logarithmic type table that you can shift with matrices or rotor to vary the cypher .as such your two password's if you only use the two or more passwords to seed a cypher table of which there can be many as separate steps. The data you can pass can be looked up with thus tables in the same as enigma or PGP ( Pretty Good Privacy each time you access the cypher table you must rotate it by matrices so that you get a fresh table Cypher tables can be diffant. This can be repeated on the server to get same cypher step. The information you pass is only a sentence which is cyphered into something else. This way you can change what you send and it will vary each way time you send it . Alan Turin and his team did great work extracting data from Enigma at Bletchley park in London. D
  17. Thanks @Fritigern GothlyThe list is only imports 15 lines before giving this message the lines only contain () and tab 09 character as well as text which is song name number with (Piano Arrangement)-0 after it then tab 09 and then a number. I really am unsure why the sound system will only work with soundname-01 etc to soundname-255. IT seems to sort differently if you introduce soundname[074]-01 or if you use songname -01 [074] it states it cant find the file name songname -01 [074] as an error
  18. I just want a scrolling text screen from it it displays no text at all comes with fonts I have a grid build by the display builder i just bought of MP it doesn't seem to work at all unless i am missing something. The display builder building unlinked grid which i linked as it was stupid it did not do this . I copied n the file FURWARE text v2.0.1 into the linked set and created a simple script to put some characters up to try it I don't know why it does not work my grid display is 3x4 default { state_entry() { llMessageLinked(LINK_SET, 0, "", "fw_reset"); string link = (string)llDetectedLinkNumber(0); string face = (string)llDetectedTouchFace(0); llMessageLinked(LINK_SET, 0, "c=blue; a=center", "fw_conf"); llMessageLinked(LINK_SET, 0, "Some user data", "fw_touchquery:" + link + ":" + face); } touch_start(integer numDetected) { string link = (string)llDetectedLinkNumber(0); string face = (string)llDetectedTouchFace(0); llMessageLinked(LINK_SET, 0, "c=blue; a=center", "fw_conf"); llMessageLinked(LINK_SET, 0, "Some user data", "fw_touchquery:" + link + ":" + face); } }
  19. @phate I cannot use jira its insulting to me I don't use jira at all sorry really not interested in it at all sorry I tried to import via note card and that just gave me heap stack overflows so this is still preferred option to get it resolved Thanks D
  20. Hi @Mollmews So technically I have to either place myself on the circumference and find the center to calculate point to move too from center Pythagoras from this dia and the angle of next move ?
  21. I think that you are looking for is Cryptography not encryption I would suggest you google some boos types and read up as there is lots of systems which can be used . You seem to want one similar to E2PE which secures credit card numbers ? Molly there is alternatives to llFrand() on LSL which are better
  22. Have Furware but I used generator to generate the screen and dropped in the control scrip and created a little scrip from the examples it just displays nothing a bit like xyz als its hard to miniaturize this when i make it small the script makes it larger is there a newer solution that works?
  23. Hi everyone my sound system worked well until added [123] etc for bpm on the file name as songname [bpm]-01 now the files do not sort in order an do not play reporting an error stating they cannot be found presumable as the Sound system cannot read items out of order . I really wanted the bpm on and tried songname -01 [bpm] which failed even more as it could not locate he song with somethng on the end of the song name has anyone come across this as I am starting to believe I have to create more storage with this in a note card as nothing seems to work adding this to file names. I think the problem is the preloaded as in here for( c = 0; c < total; c ++) { //llOwnerSay("Starting preload total lines :"+(string)total); preloading_wave_name = llGetSubString(_llGetPlayListItem(PLAYLIST_NAME, c),0,llSubStringIndex(_llGetPlayListItem(PLAYLIST_NAME, c),")")); //llOwnerSay("Preloading : " +preloading_wave_name); llSetText(llGetObjectName() + "\n(preloading " + llGetSubString((string)((total - c)*preload_load_time),0,3) + " secs)" +"\n.", <1,0,0>, set_text_alpha); //Attempt to preload first x wave files to local machines cache! llTriggerSound(_llGetPlayListItem(PLAYLIST_NAME, c), 0.0); llPreloadSound(_llGetPlayListItem(PLAYLIST_NAME, c)); //start play sound timer in 'timer_interval' seconds when we are less than 'timer_interval' seconds from // finishing preloading. if ( ((total_wave_files - c) * preload_load_time) < timer_interval && !timer_started) { //llWhisper(0, "Starting timer:" + (string)timer_interval); llSetTimerEvent(timer_interval); timer_started = TRUE; } llSleep(preload_load_time); } i=0; c=0; and or in timer here if(i + waves_to_preload <= last_wave_file_number) { preloading_wave_name = _llGetPlayListItem(PLAYLIST_NAME, i + waves_to_preload); llTriggerSound(_llGetPlayListItem(PLAYLIST_NAME, i + waves_to_preload), 0.0); llPreloadSound(_llGetPlayListItem(PLAYLIST_NAME, i + waves_to_preload)); } Is there something i am missing or have i really got to waste more storage?
×
×
  • Create New...