Jump to content

Sari6t

Resident
  • Posts

    75
  • Joined

  • Last visited

Everything posted by Sari6t

  1. Hello all you smart people I run into the situation now and then where I would like to have a timer() inside a conditional if else if. I just get errors trying it the few ways I can think of. Is it possible to do in the first place? For example I would like to have a simple agent scanner. It uses llGetAgentList and was written by someone else. Works a treat and has a timer. I adapted it to be inside an on/off switch but the timer ever had to go in order for it to work. The problem is that it wont update , thats what the timer was for. Oh wait , maybe a custom function? how about that? Cheers :)
  2. Yay me, I figured it out and it totally works now. woot woot I can POST and GET anything. So a little planning and I think a new grid wide system is born Can I Kudo myself? lol Nahhhhh
  3. I've learned so much over these last number of weeks and if I can get this one I'll be super happy. I've been working on various ways to communicate prim to prim across the grid, I've used 3 prim chat relay, not bad, I' ve used email, slow and address issues and finally descided that an external server is the best scalable solution. So, I have it up and running mySQL and PHP and thanks to a ton of snippets of code I have a semi working setup. I can write to the database easy enough and sending useful bit of data I didnt know existed until now has helped to shape the future design on this relay grid wide com system. That being said I am perplexed as to how to retrieve the information from the database. ....<Insert loads of snickering from smart people here> :) Thing is this. It all about the llHTTPRequest, and http_response and of course the PHP page that handles the request . But my mind is soup after so much input and I could really use someone to demonstrate the thing I am missing in the simplest form. Or even point to something that does. I'v eread jsut about every article on Google and sadly some are really close but leave out the one thing I need or it from the an SL archive that links to something even older :( and that is no longer available. This is what I have, its messy , not secure and likely will send shudders down the spine of many, <?php include_once("THIS IS SECURITY LOL/db_conx.php"); $user_key = $_POST["user_key"]; //incoming userkey $user_name = $_POST["user_name"]; // Incoming user name $URL1 = $_GET["URL1"]; // URL $URL2 = $_POST["URL2"]; // URL $consoleID = $_POST["consoleID"]; // Console ID $table = "tardis"; //Connecting to your database mysql_connect($hostname, $username, $password) OR DIE ("Unable to connect to database! Please try again later."); mysql_select_db($dbname); //Fetching from your database table. $query = "SELECT URL1 FROM tardis WHERE tardisowner='ManwithFezz' "; $result = mysql_query($query); if ($result) { while($row = mysql_fetch_array($result)) { echo "URL: " . $row["$URL1"]; } } ?> ///////////////////////// SL Script /////////////////////////////////////////// key myHTTPRequest; list params = [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded"]; string url = "http://example.com/Register_URL.php"; key user_key; string user_name; key rlReq = NULL_KEY; string smURL; string URL2 ; string URL1; string consoleID ; default { state_entry() { } touch_start(integer number) { myHTTPRequest = llHTTPRequest (url, params, "user_key=" + (string) user_key + "&user_name=" + user_name + "&URL1=" + (string)URL1 + "&URL2=" + (string)smURL + "&consoleID=" + (string)consoleID); } http_response (key request_id, integer status, list metadata, string body) { if (request_id == myHTTPRequest) { llOwnerSay("Details: " + body); llOwnerSay("PRIM UUID: " + (string) llGetKey()); llOwnerSay("URL:" + (string)URL1); } } } When I click the prim it returns the ECHO text but no data and I get the PRIM UUID but that I know why . Ahh my brain thanks anyone who can help. Long stroll in the sun required. :)
  4. Well I spent 20 hours learning all the ways I can make it not work and keep learing more as I go. Stripping things from headers and whatnot is way past me at this point and I have given up on doing it all internal. So now I set up a mySQL DB and have the bare bones of SL interaction working. I can send some info to the DB and it stores it. To get two objects to communicated Im fuzzy on the logic. Do they SHARE a URL? Or do they rather need to have the other objects URL and vice versa in order to communicate? I think its the latter that is correct. Once I send a URL to the DB does that ever need updating? I think it would, I get the feeling URLS in SL are more than temporary but rather get deleted on resets etc. I imagine then that both objects would query the database on rez or every 30sec or both to get the current URL and that each object would have to have an ID to the other object and know that ID is the correct object so they know who they are talking too. Then it all works right? lol Where is the sample for that on Google? If I can get that to work though then there is a whole world of possibilities that can be built from that foundation. I haven't been abe to find teachers per se inworld and LSL in the RL is super limited but I will keep trying. Last thing, does anyone know where people teach this stuff in world ?
  5. It works. I see the url change now on TiNY. How do I get two objects to use the same URL from TINY? Each time I reset or rez one or the other , it gets the new URL and the other keeps the old one. arg... THis is the same as just using the SL URL , but I know or thik its possible , just not sure how
  6. Ok I got it , it works !!! YAY the URL updates in TINY after rests. SO cool. Thank you So now I need to figure out what I need to replace in my relay script so that each prim uses this instead. any Hints? I'm thinking htat if I can use the llHTTPRequest and stuff in what this script is doing in there for each prim then MAYBE it works. I'll try
  7. Thank you so much for that. Since you set this up once already a quick question? The URL that TINY is asking for, is that one of the generated llRequestURL() from SL that I use for this? I've inserted one and it all seems happy but after reseting the script a few times I dont see it regestered as a click at TINY. I'm still learning so maybe this is normal or I have to do something else. Thanks again , you have been super helpful.
  8. I have found this thing that sorts out persistant URL issues called, Grid URL Persist. http://gridurl.appspot.com/ It is a free API that can be setup on Google o rjust use their app. Anyway, does anyone know about or use this? Im not at all clear on how to integrate this with say the Object to Object LSL example or the more complex relay I have but even a simple working demo would be a wonderful learning tool. Well Im clear on the logic but the syntax is making my brain ache. Anyway back to pounding out another 100 ways for it not to work lol Cheers
  9. In world HTTP Server. Now there is something I want to learn about. DIdn't know there was such a thing. That might do the trick along with the email. I've read about using email in many threads, its a bit slow as you say but for an update 20 seconds is nothing. I will have a look around and see what I can learn. Thanks
  10. Hmm thats interesting. I know Hands of Omega use an experience. I wonder if thats part of why they do? NLS is the other that has this kind of functionality but I think they are likely server based. Ok, I'll think about that, I hadn't thought about that. Thank you so much. Hugs
  11. So I have figured out how to make two object talk to each other using llHTTPRequest and that was 5 days learning but worth it. So many ways for it not to work. I have a simple question and I think the answer is "yes" but just want to confirm before I do this. The prims communicate or "Chat" just fine across any number of sims , but the URL is subject to change, thus, llRequestUrl or something like that. I can solve that in a way that works for myself but if I was to sell my creation, read "Tardis", then it would really not be practical for a customer . So, the only way I can see of having this work is to use a real world server. In that way i can figure ot how to create a unique ID for each Tardis sold, but more imporantly , keep the parts all talking to each other. Am I right or is there a llThisWorksBetter functoin I missed. :) You might be asking "Why would you want to have a grid wide chat thingy?" Two reasons, one is to allow for actual "Chat" between a consle room on one sim and an Exterior on another. And two, to be able to send the "Dematerialzie" message to the exterior from the interior. Something that never gets old for me. :) Cheers and thanks in advance
  12. Ok thanks, So llSetTimerEvent(0.0); doesn't reset it . So I need to figure out how to reset it to 0 after counting to 3. Ok cool thanks
  13. Hi there I'm a 5 day LSL scripting professional...lol, Anyway I've cobbled together loads of nifty things for a super ambitious project ...TARDIS...and nearly have the materialization thing working. Here is where I am stuck ,or not sure about. What I have duct taped together works well enough....once. What I mean is I can say on a channel "/77 show" and it fades and glow and appears with a working timer and all that. Yay! But.. the second time it gets stuck in a loop of appearing, its like the timer().. llSetTimerEvent isn't stopping. I used a counter that seems to work fine the first time but not after that. I have to manually reset to stop it. I've tried llResetScript() but so far it just kills the timer counter totally. Not sure where its wrong. I'll post the code for it and keep banging away. Thanks in advance :) integer count; // Count function integer channel = 77; // channel number string showcmd="SHOW"; // show command - use uppercase only string hidecmd="HIDE"; // hide command - use uppercase only integer links = LINK_SET; // This is the show and hide that I need but don't know how to use properly show() { } hide() { } default { state_entry() { llListen(channel, "", NULL_KEY, ""); // Listen on a channel llSetTimerEvent(0.0); } // Listen on the channel given at the top and do things listen(integer channel, string name, key id, string message) { string m=llToUpper(llStringTrim(message,STRING_TRIM)); if (m==showcmd) { show(); llSetTimerEvent(0.1); // Wont work without it so far } else if (m==hidecmd) { hide(); } } // Makes wonderful glow and fade of the prim over a set number of seconds. timer() { float glow = 0.0; while(glow < 0.5) { glow+=0.01; llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_GLOW, ALL_SIDES, glow]); llSleep(0.01); } glow = 0.5; while(glow > 0.1) { glow-=0.01; llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_GLOW, ALL_SIDES, glow]); llSleep(0.01); } // Swapping the fade in and out does what I want in that it reversed the effect. // fade out float alpha = 1.0; while (alpha >= 0.0) { llSetLinkAlpha(LINK_SET, alpha, ALL_SIDES); alpha -= 0.001; } // fade in while (alpha < 1.0) { alpha += 0.001; llSetLinkAlpha(LINK_SET, alpha, ALL_SIDES); } // Down here we have some Prim Params again cause more is better?? llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_GLOW, ALL_SIDES, 0.0]); llSetTimerEvent(0.1); ++count; // Start Counting if(count == 3) // this is the timer that might cycle this for me llSetTimerEvent(0.0); // Kill the Event at the set time } }
  14. It runs fine the first couple times then [17:08] llSetPrimitiveParams error running rule #1 (PRIM_GLOW): bounds error; -0.01 is not in (0, 1). but thanks for the other example I was able to duct tape it into someting that nearly works.
  15. Thanks, I just figured that one out. Yay!! Thank you so much though.
  16. Thank you for your help. Your script throws an error btw . Cheers,
  17. Thank you so much, I can't wait to get a minute and try out your example. There is a lot for me to understand in it. I might not understand what you wrote so if you covered it it's just me not knowing, but what I am trying to do is the following . lol Ok imagine you are in a room, it's dark expect for a single oscillating glowing button on a table, you walk to the table and click the glowing button and the lights come on, the glowing button stops glowing as well. Does your example allow for that in the code I worte so far? Again , if it does it's just me being a noob. So, many many thanks for this. You answeredd better than I could ever have hoped for.
  18. Hi and thanks for helping. I've managed to get most of this working. I'm learning LSL, clearly lol and almost got this to work. What I am wanting is for this light switch to glow when it is off and to not glow when its on. The glow effect is perfect and it turns the light ona and off withthe other scripts Im using but I can't figure out how to make the timer() sit somewhere that I can tell it what state the switch is in. I've tried If else, but I've hit my knowledge wall and can't quite figure it out. Here is the working code that I'm certian someone will go "pfft that's east...do this" in like two seconds. :) That would be great too . So thanks , looking forward to learning how this works. // Switch On and Off myon_state() { rotation rot = llGetRot(); vector vrot = llRot2Euler(rot); vrot+=<-30*DEG_TO_RAD,0,0>; rot=llEuler2Rot(vrot); llSetRot(rot); } myoff_state() { rotation rot = llGetRot(); vector vrot = llRot2Euler(rot); vrot+=<30*DEG_TO_RAD,0,0>; rot=llEuler2Rot(vrot); llSetRot(rot); } default { state_entry() { myoff_state(); llSetTimerEvent(0.1); } // Make nice glowing pulsing light timer() { llSetTimerEvent(0.0); float glow =0.0; while(glow < 0.5) { glow+=0.01; llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_GLOW, ALL_SIDES, glow]); llSleep(0.01); } glow = 0.5; while(glow > 0.1) { glow-=0.01; llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_GLOW, ALL_SIDES, glow]); llSleep(0.01); } llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_GLOW, ALL_SIDES, 0.0]); llSetTimerEvent(0.1); } // See the event work and stare as I can't make it work with my glow thingy link_message(integer sender_num, integer num, string str, key id) { if(str=="stop") { myoff_state(); } if(str=="start") { myon_state(); } } }
  19. Its you! I've watched your videos so many times and my sweetheart has so much of your work. This is so cool. Thank you for helping. Rot and Scale I should have thought of , I'll try that. The inside geometry thing is frustrating as I only need it for things like making the topside of a Mens shirt collar and a little where something might be open like a open lapel where its not against the body , or for say the open part of a long dress where you would otherwise see through it. Maybe I'll stick to yoga pants lol. Thanks so much for your help. Hugs
  20. Hello, I've been making loads of stuff in Blender and using Avastar with out any issues for what I have been making until now. Lately I've been working on more complex clothing, things with collars and sleeves lol. Yes thats complex for me. Anyway, two things that I've not seen. One is that when I select "Fully FItted" the garment and the bones POP up above the avatar. The slides all work pro[erly but now the sleeve openings are at my head. When I test on the Beta site its the same. If I use "Half Way" its fine. The second and ore troubling is if I have used solidify, or any other way to create interior mesh , like in the sleeves. What happens is that when the arms bend the inner part has what seems like much lees weighting and pops through. I tried loads of different approaches, but its really driving me mad. Anyone have this issue? I went and grabbed some demos from good designers like Hilly and had a look at them and she seems to get away with interior polys all the time. And when I wear it , all is well. I'm trying to get a workflow down so I can create mesh clothing. I use the latest version or Blender, Avastar, Zbrush, and MD (Though not too much until I get this figured out) Thanks in advance
  21. Congrats on navigating your way through making clothing. I just did the same and started making mesh now too. So far I have learned that what I was doing with UV maps is still part of it but not until near the end. Yay, still useful skill. You'll need a 3D program like Blender as well as Avastar. After that comes the learning curve. Here are some vids that helped me so far http://www.lokieliot.com/blog/?p=1193 There are many more of course. My advise is to just make anything, no details or fancy photoshop work, just anything. Once you see the workflow from start to finished uploaded and wearable mesh you will have a list of things you need answered to get better at it. Once I made and tested 3 items I understood where that problems were, how not to do a ton of stuff and gt a nice finished product. Now I am working on thngs like making it as low Land Impact as possible. Good luck and have fun.
  22. Hi Me, I figured it out!!! Now on to making makeup that looks good.
  23. Thanks for reading. I grabbed the LeLutka Creator Kit to make a few makeups for fun and see where it goes and while making the applier was easy, the instructions are mostly good, I find I have a couple of techinical issues to resolve before it will work. It is worth mentioning that I have never assembled an applier with UUID's and what have you and so these questions may seem basic to someone who knows that answer. I am happy to meet such a person. //////// Problem ////// In the kit is all the required bits and pieces to make the applier including 2 UVmaps. One has a grey background and the other is transparent, I assume for an Alpha. Q: Which one should I make the makeup on? Q: Once my UVmap is done and I upload it and copy the UUID to the notecard where does this texture go? The question comes from having gone through this only to have the applier say "My LeLutka Applier I: Selection "Dark Lips" not found." So I know there is a simple bit of info missing that I am having a hard time finding. A tutorial or link or explanation would be greatly appreciated. All the best
×
×
  • Create New...