Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Calamari

  1. Thanks Roling, My current project is using 3 times, 2 are multiplexing, one of those in a separate script that is turned off when not in use, plus a 3rd timer in the main script using sensor repeat. I've been working a lot on reducing the number of timer used and thinking about when a time can or can't be combined. I had learned the multiplexing from one of your other post it's been a big help thanks again The term heartbeat timer got me thinking that here must all ready be terms for the ways I'm using timers or how they are set up, I think this will point me in the right direction of more things I need to look up.
  2. Rolig Loon wrote: That's one of many standard ways to run an extra timer in an LSL event. It works well and with minimal effect on sim load, as you noted. Especially when you are firing the sensor only once a day and looking 0.1m from your object, the load is really insignificant. When I use this method, I have always looked for "Bill the Pirate", on the theory that pirates are very elusive and hardly likely to show up anywhere near anything I build. :smileytongue: love your use of "Bill the Pirate" I would have suggested using any linden name as completely safe, but glad to see the new CEO is ruining that option by letting Lindens back in world. You got me curious about what the other standard methods to run extra timers are. I can think of several ways to count time but so far only the Sensor Repeat / no_sensor works exactly the same way as a timer that comes to mind. I'll have to look in to that more.
  3. I thought I'd share this as I can see it could have some other uses, but I'm wondering if there's some reason this would be bad that I'm missing? I coulden't use a timer event for this because the timer is all ready in use, and gets reset each time an avatar interacts with the object. I'm using the no_sensor event as a 24 hour timer (it's ok if the times not exact) to reset the pos and rot to get rid of a small amount of drift from KFM. I've tried this several other ways that work, but found the sensor to added the least amount of run time. I thought this would be a really bad idea, but after trying it I'm surprised to see it's only adding about 0.00002 ms to the run time. I see in the caveats there can be problems detecting near sim borders, but don't see that being a problem because it's set to never detect anything, an agent can't have a 1 letter name. default { state_entry() { llSensorRepeat( "q", "", AGENT , 0.01, 0.01, 86400.0 ); } no_sensor() { llOwnerSay("test"); } }
  4. llCastRay() can't be sceen, it just finds the target or object pos / info, of what is in front of it. You can use llCastRay without mouse look. http://wiki.secondlife.com/wiki/LlCastRay Ideas for uses: Weapons - Raycasts are the traditional tool used in game development for simulating projectile weapons. They are orders of magnitude more efficient than rezzing a prim and launching it from a weapon.If what you have all ready works that might be the best way, with cast ray for a missile you would still have to rez the missile and cast the ray, and have the two talk to each other, I think most the of the time with castray people are using a particle effect, which is better for bullets and lasers.
  5. if your using mouse look to aim you could use http://wiki.secondlife.com/wiki/LlDetectedTouchPos in the target and back ground prims. When touched have them message the missile to give it the target pos to hit, the missile just become a visual effect, the original touch would be the actual trigger for counting the impact for event with game, such as score keeping. The missile still could explode on collision to trigger particle effects but not need a special target, it would just explode on any colission. http://wiki.secondlife.com/wiki/LlCastRay might all so work, looks like it can detect linknumbers, cast ray was intended for this kind of use, but it's not something I've worked with much. again i think it's an other case of the bullet or missile just being the effect .
  6. Thanks for sharing this Madelaine, I'm very interested in any type of math that is useful for programing not just the bitwise math. until I started playing around with LSL I've never had a use for math, I wish I had found an interest in it when I was younger, but having fun catching up I love how with mixing programing and math for learning you get results that you can see makes experimenting and learning much more fun. I just happen to have a big interest in ocean waves, tidal cycles, and Theremin music (not at the same time lol) Can't wait to test your example!
  7. entity0x wrote: -- UPDATE ---- BEWARE, its like playing Minesweeper out there! My bad, I guess I need a reminder every so often as I mindlessly look through several freebie stores to see what I can pick up for cheap props to use in the background, or machinima, today I was in a free script shop. Wall is advertised as a 'free script' wall, with most clicks being $L99. TYPO THANKS FOR THE PATIENT RESPONSES! Wall is advertised as a 'free script' wall, (in a freebie store) with most clicks being $L0. Its interesting that after you click a few to view what comes in the contents, that you find one that might be of interest for study, and before I could do anything, my mindless clicking did a nice purchase for $L99. As if inworld stores don't have a challenge to get and keep people coming to their stores, tactics like this can be interpreted as pretty shady; it hasn't been the first time a paying item is embedded in a see of FREEBIE clicks. I'm sure in my noobie days in SL I've given away several hundred Lindens, not realizing that 'cash sound' actually took out cash that time. My bad. I got soft. Thanks for the reminder. Everyone else, beware those mindless clicks on in-world merchandise. Things like this keep people dealing on the marketplace, where it's safe and has almost too many 'really buy?" windows. First question, I went inworld and found a freebies store that has a wall all most exactly like the one in you image just it din't have the green $L0 Free over each box. Did you add that or did I find the wrong store? If the green prices were added then it's not clear to people looking at you image how hard the prices are to see. With out the green prices I can see were that could be confusing some were free and other not, but neither did a see a sign saying they were free, and you still have to confirm. second question why post this in the merchant forms? No need to warn real merchants about freebies. Most of us would never touch a freebies as a building component, as many freebies are stolen, many of the old free scripts are out of date or truly free as in straight out of the LSL wiki, actually many of the simple scripts some people sell for are straight out of the LSL wiki or library. If your trying to warn freebies hunters then the general forum would be better. As merchants were running businesses in SL and not here to set up freebies areas to give things away to lure people into accident buying some thing. To make sure people don't mix up free and non free items at my shop I simply don't have any freebies, and I only sell on the makerplace. From time to time, I do give free items to my repeat customers, but not to people just looking for free items. Freebies help out new residents and that's good, but after that I think they are actually bad for user retention in SL. It's easy to walk away from an account with a free inventory, much harder to walk away from an account with a payed for inventory, that and I think there's more value in some thing you want to buy, and some thing you randomly find grabbing every free thing you can find. One of the largest hunt group in SL has lost over 3000 members (well over half) I think that says a lot about the value of free. An other down side of freebies is that many of the freebie areas are just collection of free items people have collects and are not the original creator, so there's no customer service for them if there are issues. Not saying that all free item's are bad but a lot are.
  8. I started thinking about which LSL functions use bitwise OR , and first thing that comes to mind are particle mask flags, and request for permisions. Until now I haden't thought of the | operator adding the paramiter together http://wiki.secondlife.com/wiki/LlRequestPermissions integer perms = PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION;llRequestPermissions(AvatarID, perms); under particles there was a good example that puts a lot of this together, much to think about here. http://wiki.secondlife.com/wiki/LlParticleSystem integer ColorAlphatoRGBA(vector color, float alpha) { return (((integer)(alpha * 255.0) & 0xFF) << 24) | (((integer)(color.x * 255.0) & 0xFF) << 16) | (((integer)(color.y * 255.0) & 0xFF) << 8) | ((integer)(color.z * 255.0) & 0xFF);} vector RGBAtoColor(integer rgba) { return < ((rgba >> 16) & 0xFF) / 255.0, ((rgba >> 8) & 0xFF) / 255.0, (rgba & 0xFF) / 255.0 >;} float RGBAtoAlpha(integer rgba) { return ((rgba >> 24) & 0xFF) / 255.0;} I had to look up what 0xFF was so now reading about hex and LSL
  9. I kept track of if it triggered or not for 16 counts, here's what I got, if(count & 0 ) //= 0000 0000 0000 0000 if(count & 1 ) //= 1010 1010 1010 1010 if(count & 2 ) //= 0110 0110 0110 0110 if(count & 3 ) //= 1110 1110 1110 1110 if(count & 4 ) //= 0001 1110 0001 1110 if(count & 5 ) //= 1011 1110 1011 1110 if(count & 6 ) //= 0111 1110 0111 1110 if(count & 7 ) //= 1111 1110 1111 1110 if(count & 8 ) //= 0000 0001 1111 1110 could be very useful for times. MUCH to think about here Thanks again irihapeti !
  10. Thanks irihapeti, I went back over my timer test script and tried your variations, and then tried similar changes to the other conditions. Besides finding several equivalences, I all so found a new way to use the timer. if(count % 4 ) llOwnerSay("skip every 4th count");
  11. Thanks irihapeti, and I agree thats good place to start, I would like to learn more about using the bitwise operators they are still a bit of a mystery to me. I did some searching online and found a good blog post about math for programing with lost of other links in it. http://inventwithpython.com/blog/2012/03/18/how-much-math-do-i-need-to-know-to-program-not-that-much-actually/
  12. you forgot to fill in what give all dose. } else if(mes == "Give All") { "something goes here" }
  13. try PSYS_SRC_ACCEL not sure exactly what effect your trying for, I used it in a particle cord between 2 attachments it seamed to control how fast the cord responded to the avatar moving, if I remember correctly it's been a while since I worked with that script.
  14. Thanks Rolig for the reply that will give me some thing to look into. here's some thing I started playing with based on a post you made on timer loops. I had to look up what the % operator was in LSL and started to play with all the combination of the use of Modulo operations to see how many way I could control single timer in different ways at one time. I had know Idea what Modulo operations were until I looked it up, made me wonder what else I din't know. Here's what I've come up with and added to your original script I found here. http://community.secondlife.com/t5/LSL-Scripting/The-timer-loop-how-it-works/td-p/948641 // http://community.secondlife.com/t5/LSL-Scripting/The-timer-loop-how-it-works/td-p/948641// % = Modulus/Cross-Product// https://en.wikipedia.org/wiki/Modulo_operationinteger count;integer ON;default{ touch_start(integer total_number) { llSetTimerEvent(1.0* (ON = !ON)); //Turns timer ON and OFF } timer() { ++count; //llOwnerSay("count = " + (string)count); if(count%1 == 0)//if count diveted by 1 has not remainder { llOwnerSay("1");//every count } if(count%2 != 0)//if count diveted by 2 has remainder = odd { llOwnerSay("odd");//every other count odd } if (count%2 == 0)//if count diveted by 2 has not remainder = even { llOwnerSay("even");//every other count even } if(count%4 == 0)//if count diveted by 4 has not remainder { llOwnerSay("4");//ever 4th count } if(count == 6)//do some thing once { llOwnerSay("6");//on count of 6 only } if(count == 8)//end and reset { count = 0; llOwnerSay("end"); llSetTimerEvent(0); } }} that what I've come up with to add to it so far.
  15. Ive been having a lot of fun learning LSL over time, but now I'm thinking that improving my math skill would help out with scripting n genral. I was wondering if any one had suggestion on what math topicks would be usefull to learn more about. I thought this might be an interesting topic to start, if any one else has math question feel free to add them.
  16. Rolig thanks for breaking it down that way, I tend to read scripts from left to right and it's quite clear now that, that's not all ways the best way.
  17. Thanks LepreKhaun for the tips, I'll have to think about that tomorrow I'm too tired tonight to even become a bitwiser lol
  18. Thanks Rolig, I think my alpha switching problem is just my bad Internet connection, and by bad I mean it took me 6 hours to log in long enough to be able to reply here with out getting kicked off. Thanks for the other tips and advice, gives me lots to think about, I like your shorter listen event, I got how all that works except for the bitwise operator ~ Is that toggling the index values from the listFindList? I like the strong trim tip to, but wish it could just be added as a key on my keyboard or mouse lol
  19. I'm trying to use llSetLinkAlpha to switch between hiding or showing an object. When used in a touch event it works fine integer status = 1; default { touch_start(integer total_number) { if(status == 1) { llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES); status = 2; } else { llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); status = 1; } } } But When I try it in a listen event, most of the time randomly some of the link # fail to switch when triggered integer listen_handle; integer channel; alph(float alpha) { llSetLinkAlpha(LINK_SET, alpha, ALL_SIDES); } default { state_entry() { channel = 0x80000000 | (integer) ( (string) llGetOwner() ); listen_handle = llListen(channel, "", "", ""); } listen( integer channel, string name, key id, string msg ) { if(msg == "hold") { llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES); } if(msg == "rest") { llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); } } on_rez(integer start_param) { llResetScript(); } changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } } The touch event works all of the time and the listen only part of the time some of the time, and as I'm writing this it getting better, I'm starting to wonder if this is not a script issue but related to my really bad Internet connection? I've all so tried this with a loop that called each child separately one at time but that too only worked if there was about 0.4 delay between calling each child in the loop, but that ruins the quick hide /show change. Not sure if this is just a bad connection issue or some thing in the script I've missed, any advice would be greatly appreciated.
  20. Thanks I added a touch_end event to the second state and it works now. Touch start is so commonly used I didn't even think to look there for the answer. Back to the basics... thanks again.
  21. I don't use states very often, today I came accross this problem, not sure if I'm doing some thing wrong or have found a bug? touch_start fails when used with touch_end in a script with 2 states. Touch start in the default state responds the first time, but then fails about 90% of the time after that. default { state_entry() { llOwnerSay("state default"); } touch_start(integer num) { llOwnerSay("!!!!!! touch start !!!!!!");//fails after first time } touch_end(integer num_detected) { llOwnerSay("touch end"); state off; } } state off { state_entry() { llOwnerSay("state off"); } touch_start(integer num) { llOwnerSay("state off touch start"); state default; } }
  22. Melita Magic wrote: Mitsuko Kytori wrote: Hello, I have all right on my products for sure. But this day Linden Lab delete in my marketplace shop all my sculpty eyes for free !! Because ... the eyes make spam !!! Then good for you, to make everything free. Makes me think of the old days of SL. Sorry to hear your things were deleted. I have no advice on that. I don't list on MP. Merchants here can help you. Maybe also in the Merchant Forum. You mean back in the old days when there were 20,000 less regions. What were land prices like back then, and how many people were in SL?
  23. I get your point about the land impact count changing with mesh, and I do like my trees to be modifable, but knowing the land impact count is one of the first things I and many other people in SL look at. I would recomend listing the base count of the tree as it is when delivered and then make a note about the count going up as you increase it's size and list the count at 1 or 2 larger sizes. What works in SL may be difffrent then what your use to in RL, the best way I can suggest to help you under stand land impact and how it effects customers is for you to get a small 512sqm lot of land with 117 prims, and do all of your building there, try to set up a home and a shop, of course you would be able to do all of that at one time in such a small space. there are over 41,000 people in sl with linden homes who only have 117 prims or land impact to use. http://gridsurvey.com/index.php
  24. Mitsuko Kytori wrote: Hello Calamari, Perhaps, I make mistake, but : the link for marketplace is in my secondary picks about the shop. The land is in search too. But, this day Linden Lab delete some of my products in marketplace because the products make ... spam !!! I think the shop is perhaps in "blacklist" ? ... I see that link now, but the first one I see in your profile about is: http://community.secondlife.com/t5/General-Discussion-Forum/Marketplace-how-subscription-work/td-p/1774547 not really a good way at attract customers. All so if your link is in your picks let people know that in your about section of your profile and make it visible so people don't have to scroll down to see it. Looks like you fixed some of your listing you diffidently had some keyword Spam when I looked at them last night, mostly looked like you had a list of all the types of items you sell and not just the keywords for the individual items which is what you should have. All so just noticed that your tree listings on the marketplace don't list the prim count or land impact, to me that just says that the creator is trying to hide a high count specially if it's mesh. Look at the top selling trees and see what their prim count is.
  25. I went to your shop, nice trees. On the maketplace sales = search placement. If your trying to out sell some one who has been in business for several years longer then you have then, it's going to take time to move up in search placement. Some products like trees people want to see in world before buying, so even if they find it on the makertplace they might buy it in world which doesn't help your search placement. One thing you could try is selling things on the marketplace with a discount and let people at your in world shop know that, then get involved with several hunts to get traffic to your in world store hoping that some of them will shop on the marketplace once they see your stuff. Your in world store has no classified add and is not listed in search, and there is no link to the marketplace in you profile. Selling trees make great free advertising, a customer buys one set it up on their land and some one sees it and likes it, so clicks on it, opens the creators profile, and hopefully sees the link to both the in world and marketplace.
  • Create New...