Jump to content

Berksey

Resident
  • Posts

    199
  • Joined

  • Last visited

Everything posted by Berksey

  1. Probably about 90% of the kids at the anime mall I hang out at have attachments listening on 0, such as dancers and/or autoresponders, plus there's more than one amusement item that I'm pretty sure use channel 0 for interactivity, but the only real lag I've ever noticed there is textures taking a while to load, or the same sort and frequency of chat lag I get at home with two other people and no listening attachments at all. I've been trying (since Innula brought up the subject with me) to avoid constant listening on channel 0 when it isn't necessary (because every little bit does help), but if you're running a little chat bot or autoresponder I don't really see it having that much more impact on lag than, say, a "What The Duck" dancer. ^-^;
  2. This is great information to have. Thanks soooooooooo much for sharing it~!
  3. @Innula Zenovka: Yeah I knew it wasn't perfect probably, I'm a night owl and I'd just logged on... ^-^; but cool, I was actually wondering if I should bother with that bit, as it's kept RegionSayTo from working a few times on things, anyway... That's way simpler and makes good sense, Innula, thank you~! Also, I never knew that thing about channel 0 either, so thanks for mentioning it, that's good to know. Yeah, I've found it's just like that with llSleep, you really only want to use it to stop anything else happening while, say, an animation finishes playing, or to let a particle explosion finish before using llDie to delete the firecracker or whatever. Timer events are totally the way to go if you're just trying to set a timer on something. I was making edits for like a half an hour, so at some point I did drop all the sleeps it had in it... by then I had dropped all the sleeps in me too, so I was a little more on the ball. I knew once the experts got here it would all get sorted proper! @Sumomo Cheri: Your AO is probably using high-prioroty animations, i.e., it's overriding the animation for the sign. This is common, and most of the time the best workaround is just to turn the AO off for anything else that's using an animation.
  4. Okay, first off, your permissions request is really only necessary once. I'd put it in the state_entry block. You can also leave out the | PERMISSION_TAKE_CONTROLS and all control related functions, really, if all you want to do is show a sign, as you're not really needing mouselook to do any of this stuff. The thing is, you're adapting the popgun script, and you'll want to leave out anything unnecessary. I've used the popgun to make lots of things, so I'mma try to clean it up some and show you how I'd do it... string sound = "6f02e5e7-5025-d56c-2d35-8273e44011cc"; string animation = "hold_R_handgun"; default { changed(integer change) { if(change & CHANGED_OWNER) { llResetScript(); } } state_entry() { llSetLinkAlpha(LINK_SET,0,ALL_SIDES); llPreloadSound(sound); llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); llOwnerSay("say start or stop in local chat"); llListen(0,"",llGetOwner(),""); } on_rez(integer param) { llResetScript(); } listen(integer channel,string name, key id, string msg) { string message = llToLower(msg); key owner = llGetOwner(); if (!owner) { return; } else if(message == "start") { llPlaySound(sound, 1.0); llStartAnimation(animation); llSetLinkAlpha(LINK_SET,1,ALL_SIDES); llSetTimerEvent(5.0); } else if(message == "stop") { llSetLinkAlpha(LINK_SET,0,ALL_SIDES); llStopAnimation(animation); } } timer() { llSetLinkAlpha(LINK_SET,0,ALL_SIDES); llStopAnimation(animation); } } This might try to cause an error on compiling, cos I'm just typing it up quickly, but it's to get you closer to the right idea... It might have a mistake or two. Mind you I've also taken the liberty of simplifying it to pretty much the bare bones, so you can see the basic functions at work. Saying "start" should begin the animation, make the sign visible, and leave it up for 5 seconds before putting it away again, and "stop" ends the animation prematurely and puts the sign away in case you just want to stop early. I put the normal ending of the 5-second pause in a timer event instead of using llSleep() because if the script is asleep it can't hear chat commands. If you're wanting to do different textures for different signs with the "!command1" or "!command2" thing, you can do that easily by recycling what's there. I just kept it simple... ^-^; Notice how different it is than the original popgun script; while I myself learned a lot from that old thing, eventually you'll start thinking in terms of effects you wish to produce and stringing them together without having to adapt scripts with unnecessary effects and functions in them. ^-^ You're off to a decent start though! Also, always remember to use "else" between "if" statements if they're in a row, or you'll end up not really being able to do half of them when you use the chat commands, even if it compiles. It'll treat everything before the final "if" as if it doesn't exist. Hope this helps make things a little simpler, and if you need any more help with it, just ask. ^-^
  5. Ah, the modified WTFPL, yes... I believe that's known as the WTFPL.2.0.1, if I'm not mistaken (or making things up).
  6. I'd like to add that if nothing else in the script is crucial at the time besides the animations, you can use llSleep() (for however many seconds) right after starting an animation as a timer, then when the animation has finished that much of itself (and the sleep wears off) you stop that animation and start the next one. I was skeptical at first, but you can time animations almost perfectly this way if you know how long it takes to reach the stopping point in the loop. Putting the script to sleep doesn't stop the animation from playing, it just pauses the script running during that time. I'm sure there are better/more elegant ways of doing it, but this is what's worked for me while I learn how to actually use timer events properly.
  7. I don't know how you'd stop an animation looping if it was set to loop when it was uploaded... The only way to stop it would be to literally stop it, as far as I can tell... I wouldn't be calling two animations to start one after the other either, if they're set to loop, because you could potentially end up with a tweaked-out looking avi rather than a drunk looking one, lol. Oh, and while nobody so far has died from necroposting, I'd suggest just not being all shy about starting a thread and just making a new one. A glance around the forum will show how eager we all are to help people out when we can. ^-^;
  8. If you run into any real obstacles or get stumped, do feel free to ask for more help. You'll get plenty of it. ^-^
  9. People always complain that they Googled something but couldn't find any answers, and then they come up with solutions and don't share them. Gee, I wonder why it's so hard to find answers... It's one of the worst feelings in the world when you finally find a search result that says (SOLVED), and there's nothing there. "Nevermind, everyone, I solved it!" "What about the rest of us?" (crickets chirping)
  10. I'll tell you one thing, you're going to want to keep it simple. I do like the idea for the dialog input, though. I'm sure it wouldn't be too hard to make a dialog "menu" with buttons, and a few clicks could do most of the work... You could have a couple of options, like healing, damage, etc., and then type in how many points and click "Ok". I'm tempted to type something up for that... Though I'd probably be tempted also to just use chat commands on a GM channel to deal specific amounts of damage to correspond with the results of dice rolls, like if the roll came up 19 on a d20 (hypothetical d20, mind you), you'd type something like "/12345 playername 19d20" or something similar, and it would tick that many HP off the player whose name you used... Or just type in the channel number, player name, and how many points of damage to deal. Not exactly what you're wanting, though. It should be easy enough to hack something together with what Xiija posted, but if it gives you too much trouble we're definitely here to help you out; I have quite a bit of experience myself with my own combat meter, which works very similar to what you're describing (it uses messages sent on hidden channels rather than collisions). Please keep us up to date on how it goes, too, even if you get it all finished!
  11. People even learn from the stuff that doesn't work, like when people post broken code and others post their fixed versions. I second this wholeheartedly; letting the records stay intact keeps the information out there for others, and also can let them see sometimes the progression from un-working to working script. It's like when people say they solved it and then they say thanks and leave, and don't share how they solved it; much better to post the solution so that other people can learn from your example! Not everyone here is just looking for a quick fix to a problem, a lot of us are here as a form of continuing education. ^-^;
  12. Thank you, Innula! Saved me waiting till 2AM SLT!
  13. All I'm seeing so far is that it was scheduled to go and exists as a function with a missing or possibly never-existing ID... I'll have to either find something with it in, or hack together some little whimmydiddle and try it at home and see what it does. Oh, duh, there's a script example on the page... I'll post results when I get them~! EDIT: I got the sample script to compile. Apparently if I want it to work all the way and return proper results, I'll have to get my SL mom to make a copy of the script and put it into the object, because you have to be the land owner and able to deed the obect or it won't tell you the parcel music URL anyway... But it did compile, and the error it threw was based on it actually working properly, I suppose... at least its safeguard is in place, i.e. "[16:32] Object: Sorry, could not retrieve parcel's music URL. You'll either need to be the land owner or able to deed me." Now I want to make it work. I'll see if I can get Mom to help me and nope, I ain't even embarrassed to say that~! <-<; I'm a big girl, I just don't own the parcel is all. >->;
  14. I see the link on the wiki fine at http://wiki.secondlife.com/wiki/Category:LSL_Functions, and the article says testing on the main release in 2011 had it compiling but with empty output. It doesn't say there are any problems with it, but it's a very specific thingy and only works if the owner owns the parcel, apparently... I'm sure someone will know way more about it than I do, but I'll still try it out later inworld and see if I can get it to compile/work in a script. Oh, and it does have the little flag that indicates "The LSO function ID for the function is not known, or it may not have one." I have no idea what that means, though... ^-^;
  15. And you're still functional. I'm not quite that hardy, but I applaud your lasting this long! Actually, I've thought before how nice it would be to have some regular expressions of some sort in LSL; it might make some things way easier. And you know, thas also why I pooh-pooh anyone's attempts at pooh-poohing LSL for not having what some of the other scripting languages out there have. If SL people decide they need LSL to do something, and LSL can't do it, then they find a way. I think the challenge of overcoming limitations in the language through creative thinking is just as much a part of why I do this stuff as, say, wanting to make a toy that farts on command. Possibly the better and nobler part of it, too, considering the whole farting toy aspect thing...
  16. I'm certainly not anywhere near either end of the spectrum myself; I think my personal feelings on good coding practices fall somewhere between "does it work?" and "can I make sense of it?" I used to be into Perl, and regular expressions ate my brain... I'd get 50 lines of code down to a single line of regex, and it'd work wonderfully, and later I'd want to change it and couldn't even reverse-engineer my own work, it was so foreign to human thinking... So yeah, I think a happy medium is the most reasonable approach. If it works well, and you can go back and change it easily, hey, it's good. ^-^
  17. That is a super cool way of doing it. I'da made it work,but it would have looked more like spaghetti. Also, thank you to the OP for bringing this subject up, because it reminded me I've been meaning to make an archery target that shows hits by changing colors temporarily... I should probably get on that.
  18. That's why I like old freebie scripts so much; I look at the code, see weird voodoo stuff going on, and then I look it all up and rewrite the script in a cleaner, updated version. It's a really fun way to learn more about scripting (by breaking it all and having to fix it, lol), while at the same time giving yourself nice "modern" versions of useful scripts (once they're fixed). I've read before about the extra block of script memory thing, but with the majority of what I do myself it's never seemed to be an issue. I try to only make separate functions to call if it saves lots of repetition in the script itself, though. I figure if it makes the script a tenth of the previous length, it's worth it, because it saves a lot of time in making edits and ideally makes the whole thing go faster. Iunno if it really makes much difference, but it seems to make sense to me that a much shorter script is kinda balanced by the potential allocation of a bit more memory... Hmm...
  19. Oh, beautiful stuff, everyone! And Nova, I love stuff like that, too! I'm just not good at it yet myself, lol. And yeah, llDie() wasn't the best thingy to throw out there for that particular instance, forgive me. I might not have had enough coffee to remember you weren't deleting an object but a script in my hypothetical thingywatser... <-<; Can you tell I'm kinda new to this too? ^-^;
  20. ...Or how to tell first click from second click with the touch event? I'm baffled... I'm used to simply setting integers to TRUE or FALSE, and using that to decide what happens on the next click(s)...
  21. I agree with the above; I have several items that actually sort of need to keep a listener open in order to work at all. If it isn't listening, it won't hear what it needs to hear when it needs to hear it, after all. I do think that until one understands the whys and whens as well as the hows it's good practice to follow some sort of somewhat hard and fast rules, but once you get why the rules exist (to prevent the inexperienced from destroying the virtual universe, lol), and you know more what you're doing, they're really more like guidelines... I don't really see where it's any big deal to have a listen running in a resizer script, myself. You put the boots on, you resize them, you clean up the script and save a copy in case you need it again. As far as lag is concerned, one good 1024 x 1024 Hi-Def texture on an eyeball probably produces more than having a lonely little listen open on an obscure negative channel. If anything, a listen remove before the llDie() in the script cleanup option would be the thing, just in case. You do have a script cleanup option, right?
  22. Along with the usual free script repositories, there's another source for scripts to use as examples and to build on or learn from... some of them are from the same sources, but some aren't, and they're free and full perms... the Marketplace. There's quite a few decent sample scripts and freebies, and sometimes it's better than reinventing the wheel or the flickering lightbulb or whatever to modify one of these... True, writing all of our own stuff is best,but most beginners wouldn't know where to start really without being able to see someone else's code first. If all I'd done was read about functions, I'd never have gotten anywhere in learning how to put together a script for a specific purpose, but looking at similar work to what I've wanted to make has helped me a great deal. Anyway yeah, don't forget there's actually some decent working full perm scripts for free on the MP.
  23. Rolig, Innula, and others here are awesome to me, because they don't let their knowledge get in the way of why they post, and I like the spirit of things here when we're all throwing ideas and stuff around and they share what they all know... I've learned a lot here, and I think it's great you came back too, Greg. I kinda feel like products and services are separate things myself, and I've had people come back to me and ask me to work on stuff I gave them even when it was all stuff they could have edited or handed off to someone else to do; they just like me and how I treat them. But I always remember that working on their stuff (once I give it to them, it's theirs) is a service, and whether I give something away or sell it or its full perms or no-mod, if It's a thing, it's a "product" (or "item" if preferred). I do think it's super important though to always state your work terms fully, and make sure they agree and understand, even if they say they've read everything you ask them to. And as for working on what makes me happy, if it's just another prim radio I give them a link to the search page for them on the MP, lol. If it's something different, unique, challenging, or fun, hey, bring it.
  24. I have exactly the item you're making. Well, more or less; it's a floating skull. Mine also talks via chat commands, poofs when out of range, and dies on command for easy cleanup. I use it to raise eyebrows sometimes at Avilion... it's kinda creepy tho. His name is Crudrick Halfnutsz, late Duke of Noob'ry, lol. He doesn't just wander, but follows me, and he used to follow anyone who got within range, like a zombie NPC or something. Here's how I sorted my two issues with the facing and movement of a human skull (which I definitely had issues with, as it was mesh and mesh acts funky sometimes): First off, he didn't want to move smoothly until I encased him in a cylindrical prim (set to transparent and linked as root) and set the skull inside to the height I wanted. Basically what Innula reccommended up there ^. Before that he either skipped across the ground or sort of tumbled in the air, so this sorted that issue. Secondly, the only way I could get him to face the proper direction otherwise was to orient him correctly before uploading, so he came in facing East. Then even the simplest follower script would put him facing me when he moves. But even this isn't necessary using the transparent prim method above. Plus the movement is smoother. I know it's a tad redundant, but I had to chime in, as it's about something dear to my heart: decapitated skulls floating around and stalking me.
  25. If someone hired me to make a product for them, based on their idea, to do specific things, I would simply make it for them and give them full rights, as it was their idea and I was simply the "wrist", or executor of their design and idea. They'd get it all full perms. I've got scripts I made that are no-mod simply because I put my hard work into them and I don't want someone to be able to claim it was their work just because I gave them a copy to use. If they want something to be changable, that's what config notecards are for. But if someone asks me specifically to write a script for them, it's theirs, because I wrote it for them. I do feel that baking a pie for someone to eat or even sell shouldn't necessarily imply giving them your secret recipe along with it... The dilemma is that we're talking about pies with the recipe right there inside them, and there's more than one valid perspective on what it means to the people who are doing the work of baking the pies. At least one thing I've made and given to a friend has found its way to the MP, with someone else's name on it. But I can't get upset about that if I gave it away full perm. If I wanted to avoid this, I should have acted accordingly beforehand and protected my work (or play, if I want to be realistic about it). I personally don't think there's anything wrong at all with treating a script as a product and keeping it proprietary and simply offering lifetime service on it IF the client or customer agrees to it (even if you made it expressly for them). If it's a question of whether you provide good and prompt service, that's what customer reviews are for. If you make it clear from the start, they can take you or leave you as a scripter depending on what they agree with. Different people do business differently, it's true. Thing is, no matter how ethical you are, no matter what your work or business model, or how you feel about rights and whose they are, sooner or later a client is going to have an issue due to misunderstanding something, talking to too many people on the same subject when sleepy, or even simply changing their mind and deciding to be a butt about it rather than admit it. It happens. While I do tend to be a lot more laid back about a lot of what I make for people, and often just give stuff out free or full perms because it didn't really take me all that much work to make it (I do this stuff because I enjoy it, even the frustrating parts), I have to admit I think Greg did the right thing by giving half the $L back. That was ethical. Keeping half for at least trying to do the job and fulfilling that much of the agreement, hey, perfectly fair, I'd have done the same. Having it in plain sight to read that you have certain conditions when it comes to hiring yourself out, that's also ethical. They can see right there that you do things this particular way, and if they don't accept that, they can find someone else to do the work. Personally, I'd rather give them the whole thing to own than have to keep going back and changing things for people, but then I'm not really in it for the $L, so naturally I'd see it differently. The only real issue I can see at all is that there was miscommunication and it led to the unfortunate breakup of the deal, and there were bad feelings felt because of it. Learning from that and finding a way to make sure it doesn't happen again is probably the important thing, least from where I stand.
×
×
  • Create New...