Jump to content

Xiija

Resident
  • Content Count

    646
  • Joined

  • Last visited

Community Reputation

165 Excellent

2 Followers

About Xiija

  • Rank
    Lotus Eater

Recent Profile Visitors

863 profile views
  1. Are you set on using path finding?.. or have you tried a sensor repeat with MoveToTarget?
  2. for the RGB stuff, mebbe this will help? http://wiki.secondlife.com/wiki/Category:LSL_Color
  3. non binary toggle... integer x; integer num = 9; default { state_entry() { } touch_start(integer total_number) { if( x=x^num ) llOwnerSay("On: " + (string)x); // says ON: 9 else llOwnerSay("Off: " + (string)x); // says Off: 0 } }
  4. It's been so long since i used this, i can't remember if i made it or not lol... Non Sensor Range Checker: integer range(vector vec1, vector vec2, float rng) { if( vec1.x >= (vec2.x - rng) && vec1.x <= (vec2.x + rng) && vec1.y >= (vec2.y - rng) && vec1.y <= (vec2.y + rng) ) return TRUE; else return FALSE; } vector target = <175.0, 32.0, 3023.70508>; integer area = 5; default { state_entry() { llSetTimerEvent(5.0); } touch_start(integer total_number) { } timer() { vector pos = llGetPos(); if( range( pos, target, area) ) { llOwnerSay("In Range"); } else { llOwnerSay("Not In Range"); } } }
  5. @viggy , you would need to save the store status somewhere if your website is static. Repl.It has some ability to do a server, not sure if that is what is needed tho heh... an example: ( a chat server ) the Repl- https://repl.it/@Xiija/chat02 and the site- https://chat02--xiija.repl.co
  6. On your website, in your JS, you could do... var queryString = decodeURI( window.location.search ); console.log("queryString is : " + queryString); then use the variable to change your webpage info. ... so you would send an http GET request to your website with a search param... i.e. for your SecondLife get req url.... http://www.mywebsite.com?cafe-open and in the above example, the queryString variable would end up being .... ?cafe-open ( here is a Codepen with an example .... ) https://codepen.io/XMODS/full/KYmxYz?cafe-open ( click "change view > editor view " .. to see the code ) for persistent storage of a variable, you would need a server, or google sheet, mebbe php ?
  7. something like this in your changed event?... (untested) if (sittingAvatar == NULL_KEY) { llStopSound(); return; } string sound = llList2String( soundnames, llFloor(llFrand( sounds )) ); llPlaySound(sound, volume);
  8. Something like... (untested) integer count; list songs = [uuid#1, uuid#2, etc etc]; default { touch_start(integer total_number) { llLoopSound( llList2Key(sounds,count), 0.5 ); ++count; count %= llGetListLength(sounds); } }
  9. so, a kinda hacky trick... when you send your data to the form, use a "marker" your marker could be anything.. like .... ~start~ or .... ~end~ in this example, i used something easy to find.... @!@ ..... was my marker. so if the data you send is ...." HTTPtest 2-16-2019" ... just add your marker to that to get... @!@HTTPtest 2-16-2019 on the sheet, my cell ... ( c6) ...looked like this .... @!@HTTPtest 2-16-2019 string sheetID = "1MNKwhVqK8U8urzTWa_q0YtlGnYVn7SnICZBylstR2KE"; string sheetURL = "https://docs.google.com/spreadsheets/d/1MNKwhVqK8U8urzTWa_q0YtlGnYVn7SnICZBylstR2KE/pubhtml?gid=653993593&single=true&gid=0&output=txt&range=C6"; key selfCheckRequestId; default { state_entry() { } touch_start(integer total_number) { selfCheckRequestId = llHTTPRequest( sheetURL, [HTTP_METHOD, "GET", HTTP_VERBOSE_THROTTLE, FALSE, HTTP_BODY_MAXLENGTH, 16384], ""); } http_response(key id, integer status, list metaData, string body) { if (id == selfCheckRequestId) { string marker = "@!@"; integer start = llSubStringIndex(body,marker); integer end = llSubStringIndex(body, "</td>"); string fetch = llGetSubString(body,start + llStringLength(marker), end-1); llOwnerSay("\n response: \n" + fetch); } } } the inworld response from putting this code in a box and touching it was... the value of cell c6 (with the marker bit removed) as i said , this is hacky ... it may break depending on where "</td>" appears on the sheet... you ~could~ add an ending marker to your sent data ... mebbe it would look like ... @!@HTTPtest 2-16-2019 @!!@ to make is more safe to parse? the NEW google stuff has an API ( you have to get a key) ... https://developers.google.com/sheets/api/
  10. @oOPussInBootsOo (ETA: ty to Puss for catching the mistaken link ) to see the id from my example, you have to use the ...pubhtml link, not the edit one just copy your sheet http link, but change it like so... https://docs.google.com/spreadsheets/d/1MNKwhVqK8U8urzTWa_q0YtlGnYVn7SnICZBylstR2KE/pubhtml ( click this link below and check the page source ) The link with the sheet ID
  11. @Jazmina Voom when you right click your google spreadsheet, you choose 'view page source' ( at least i can in firefox) at the bottom of the source page you will see something like... <script type="text/javascript">activeSheetId = '653993593'; switchToSheet('653993593');</script></body></html> - when you want to GET the info from the linked google spreadsheet, your url looks something like this... "https://docs.google.com/spreadsheets/d/1MNKwhVqK8U8urzTWa_q0YtlGnYVn7SnICZBylstR2KE/pubhtml?gid=653993593&single=true&gid=0&output=txt&range=H4"; ( ...&range=H4...returns what is in cell H4 ) so the place where you see ... pubhtml?gid=653993593 ... is the sheet id from the page-source ( activeSheetId = '653993593'; ) so your response in the SecondLife GET request will return what is in that cell ( H4 in this example) from that google sheet Example: https://docs.google.com/spreadsheets/d/(your-sheet)/pubhtml?&gid=(your-sheet-id)&single=true&gid=0&output=txt&range=(what cell you want) links: the sheet from this example the actual url of the cell's return value SL wiki: How to handle a GET request
  12. heh, sry, was just codeblind.. dunno, i finally get it.. 4 - 8 = -4!
  13. just curious, why does 4 minus 0 = -4? lol i would have thought you would need to do integer RndX = -4 + (integer) llFrand(9.0);
  14. nice, @Wandering Soulstar .. it didn't work for me tho hmmm another way would be... if ( (llDetectedLinkNumber(0) == 0) || (llDetectedLinkNumber(0) == 1 && llGetNumberOfPrims() > 1) ) { // do your thang }
×
×
  • Create New...