Jump to content

Calamari

Resident
  • Content Count

    84
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Calamari

  • Rank
    Advanced Member
  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.
×
×
  • Create New...