Jump to content

Innula Zenovka

Advisor
  • Posts

    10,096
  • Joined

  • Last visited

Everything posted by Innula Zenovka

  1. Why should SL need to? If I want to do something online that's age-restricted by law in my country -- gamble, for example -- then between them the licenced casino sites, their payment processors, and my credit card issuers, are all perfectly capable of performing the legally necessary due diligence without any great ado or inconvenience for me, and with serious financial consequences for them if they don't get it right, before I'm able to open and fund an account with the site. I remember the fuss we had about age verification before we could visit Zindra when Adult was first introduced as a category (before that the two categories were PG and Anything Goes) and it was pretty obvious that, whatever they were telling LL about the checks they were doing, whoever purported to do be doing the age verification was either lying to SL about the nature of their checks and were simply confirming with a credit reference agency that I had a current credit card and was registered to vote (neither of which would be possible were I under 18) or they must have been unlawfully accessing the DVLA or Passport Authority's computer systems that I sometimes had to access for my then job, so I was all too aware of who could access them directly and how long it took for them to reply (I assume they were simply lying to LL about what their age verification services involved). Why isn't that sufficient for any other purposes? Tilia know I have a valid UK credit card and bank account, and so do PayPal. That should tell them everything anyone needs to know about my age, I would have thought.
  2. Thank you! I've not really appreciated the distinction between the two different types of vector before, and how they can represent both position and direction (I mean, I knew they could, but hadn't really thought about what that actually means in practice). So when I calculate a dot product, would I be correct in understanding that it's an expression of the relationship between two directional vectors (the cosine of the angle between them) anywhere they happen to intersect?
  3. As an alternative to using the centre of the cone for vX, you mean, rather than as an equivalent to?
  4. No, I meant I think I can calculate X on the fly, can't I?: vector vTargetPos; vector vSensorPos; rotation rSensorRot; float fRange = 20.0; float fAngle = 0.5* PI_BY_TWO;//45 degree cone vector vX = vSensorPos+<(fRange * 0.75),0.0,0.0> * rSensorRot; vector vDiff = vTargetPos - vSensorPos; if((vDiff*vDiff)>(fRange*fRange)){ //out of range } if(llRot2Angle(llRotBetween(vDiff,vX))> fAngle){ // the angle between target and the local x vector of the sensor is too big } else{//the opposite of the previous two tests, and the calculation I think I need if( ((vDiff*vDiff)<(fRange*fRange)) && (llRot2Angle(llRotBetween(vDiff,vX))< fAngle)){ llOwnerSay("the sensor can see the target"); } }
  5. Is that the cone's centre of mass (25% of the distance from the base -- the flat bit at the big end) and the vertex (the sensor)? I know the sensor's position would be, if I were using a sensor, and I know what its rotation would have been, and I know the range, so I can calculate X from that, I think, can't I?
  6. How, then, do I calculate whether the target's z value, minus that of the test point, is in range? I can see it's a similar calculation, but I'm not sure how to perform it. Or is there an easier way to do it?
  7. Am I right in thinking that I subtract vPos from vTargetPos and then examine llAxisAngle2Rot(<0.0, 0.0, 1.0>, llAtan2(vResult.y, vResult.x)) to see if the result is within a certain range? Or does that just tell me if it's within my field of vision in the x,y plane but not the cone that llSensor draws? Or, if I'm completely wrong, which is generally the case when I'm unsure about matters geometrical, how do I do it, please?
  8. Yes, but that's a very specific use case, I think. Not many people run animatronic knocking shops or whatever on their land, after all, and if they do, I'd have thought the rezzers could solve the problem, should it arise, by checking who on the parcel owns what before they try to rez a playmate, and if someone's seated on something that doesn't belong to the landowner that's too high an LI to allow this, simply have the script unsit and send them home, which should also trigger object return shortly afterwards. Would something like that not work?
  9. Yes, but if they're not using it for the 10 seconds or however long it takes me to drive across their parcel, what's the harm? If there's a problem, surely it results in my vehicle not being able to enter their parcel rather than in their objects being returned from the parcel?
  10. Even if you don't have rez rights on my parcel?
  11. Are you sure about this? One of my alts has just rezzed a car on their plot on Bellisseria: This is the resulting LI When my alt gets in the vehicle, drives it off the parcel and onto the road, and then checks the parcel LI, this is the result So initially the LI comes out of what's available on my land, but then it comes out of the region LI when I drive off.
  12. I may be mistaken, but doesn't the vehicle's LI (and that of any of its passengers, come to that) come out of the region's "spare" LI that's allocated to, but not currently in use by, individual parcels? That is, the same pool of spare LI than temp-on-rez objects use? If the region is literally full, vehicles can't enter it, of course, but otherwise I don't see how LI matters. I might not want vehicles crossing my land, or even one of their wheels temporarily impinging on it, for all sorts of reasons, but I don't think LI needs to be one of them.
  13. The other option, I guess, would be a ray cast to see what's directly underneath the avatar. Hard to go wrong with that, I'd have thought.
  14. Depends what you're trying to calculate, of course, but if you want the position of the avatar's feet, I think the calculation is vector vAvSize = llGetAgentSize(kAv); float f = -1*((vAvSize.z*1.1)/2); (and then add f to the avatar's z coordinate, of course). That's what I use for traps and things, anyway.
  15. I'm so glad I asked this question. I'm learning so much that I can apply not only to my animesh critters but more generally to all sorts of "random" events where a simple llFrand(n) isn't the right solution. Thank so much all!
  16. I'm trying to design something that will handle generic behaviour for my pathfinding critters when nothing happens to disturb them -- they simply play a few animations for a few minutes and then they go off and do something somewhere else. So far I've got this (but I haven't really had a chance to look at Tessa's latest post. float fTotalRestTime = 290.0;//so max 5 minutes float fMinRestTime = 10.0; float fTotalAnimationTime = 20.0;//so max 30 seconds animation integer iIndex; //integer iMax; list lTimes; list lAnimationsToPlayWhileStopped; string strCurrentAnim; string strPreviousAnim; default { state_entry(){ lAnimationsToPlayWhileStopped = llListRandomize(lAnimationsToPlayWhileStopped,0); //iMax = -llGetListLength(lAnimationsToPlayWhileStopped); float fRand = llFrand(1.0); float f = (fRand*fRand); float fPeriod= fMinRestTime+(1-f)*(fMinRestTime+fTotalRestTime);//up to five minutes in all llOwnerSay("fPeriod is "+(string)fPeriod); //now build a list of how often to change anims do{ fRand = llFrand(1.0); f = (fRand*fRand); lTimes +=[fMinRestTime+ (1-f)*fTotalAnimationTime ];//animations play for between 10 and 20 seconds } while(llListStatistics(LIST_STAT_SUM, lTimes)<fPeriod); llOwnerSay(llList2CSV(lTimes)); llOwnerSay("total of lTimes is "+(string)llListStatistics(LIST_STAT_SUM,lTimes)); //this is always going to be slightly more than fPeriod, but close enough for what I need iIndex = -llGetListLength(lTimes); //start first animation strCurrentAnim = llList2String(llListRandomize(lAnimationsToPlayWhileStopped,1),0); llStartObjectAnimation(strPreviousAnim = strCurrentAnim); llSetTimerEvent(llList2Float(lTimes,iIndex)); } timer(){ if(++iIndex){ do{ //choose a new anim strCurrentAnim = llList2String(lAnimationsToPlayWhileStopped,0); if(strCurrentAnim == strPreviousAnim){ strCurrentAnim = llList2String(lAnimationsToPlayWhileStopped,1); } } while(strCurrentAnim == strPreviousAnim); lAnimationsToPlayWhileStopped = llListRandomize(lAnimationsToPlayWhileStopped,1); llStartObjectAnimation(strCurrentAnim); llStopObjectAnimation(strPreviousAnim = strCurrentAnim); llSetTimerEvent(llList2Float(lTimes,iIndex)); } else{ llSetTimerEvent(0.0); //do some pathfinding stuff } } }
  17. I know it's not what I described, exactly, but I suspect I may have some sort of sine wave in mind, if only I knew how to express it.
  18. In my example, I'm saying that, after 10 seconds, the probability of something happening (critter moving to a new location/choosing a new animation/whatever) starts at 10% and then increases by 1% for each second that elapses. So for the first fifty seconds, it's more likely than not the critter will carry on doing whatever it is, though the likelihood it will decide on a new activity is slowly increasing over time and after fifty seconds it becomes increasingly likely it'll go off and do something else until, after 100 seconds have elapsed, it's certain to change.
  19. This is where I reveal, yet again, my compete ignorance of mathematics. I dimly remember things from high school but when I come to apply them, it's no more than half-remembered fragments of a foreign language. Anyway, I was recently trying to think how to script it to ensure that something would happen within n seconds, but randomly within that, while trying to ensure that, as time passed, the likelihood that whatever it was would happen increased. That is, in this particular case, I wanted my pathfinding critter to behave more or less realistically -- after wandering for a bit, it stops for at least 10 seconds, and then thinks about about what to do. Probably once it's arrived somewhere it'll at least want to stay there a bit, foraging or resting or whatever, but the more time passes, the more likely it is to want to move on. Sometimes it'll want to move on right away, and sometimes it'll want to stay there up to a minute or so, and most of the time somewhere between that. I came up with this, which does what I need integer iNeedToBeat; integer iRandom; default { state_entry() path_update(integer Type, list Reserved) { if(PU_GOAL_REACHED == Type){ iNeedToBeat = 100; llSetTimerEvent(1.0); } } timer() { if((integer)llFrand(100.0)>(--iNeedToBeat)){ if(iNeedToBeat < 90){ //then do whatever it is, so long as at least 10 seconds have passed } } } } That is, the pathfinding creature will always wait at least 10 seconds before deciding if it wants to do something new, and then, as time progresses, it becomes increasingly likely to move on to whatever this "something new" is, until it actually does so. That's the basic idea, anyway, though in practice it's going to be somewhat more complex than that. I have two questions, I think. First, I'm sure that what I've done there can be done more elegantly with some mathematical formula, if only I knew how to express it in LSL. Can anyone help me? Second, more generally, how else can we readily use LSL to calculate probabilities, and for what kinds of purposes might be do it? There must be dozens of other interesting things we can do with chance, odds and probability other than skill gaming and gachas. There's breedables, of course. What else?
  20. First, read this Knowledge Base article and then take a look at the Experience Tools page in the Scripting Wiki. Also search this forum. Though I would strongly advise posting data to Google Sheets or some other external source rather than using experience keys to store this kind of data. I've done a lot of work with both Experience Tools' KVP functions and with Google Sheets, and they're two completely different tools, suitable for very different purposes. Experience Tools and KVP are great for data you want to store and update persistently, and share grid-wide in (almost) real time, but they aren't good for storing lots of historical data you want to access at all readily.
  21. Didn't the late Ebbe Linden used to work for Microsoft? I thought he was the best CEO LL's had for a long time.
  22. And I learned it (along with just about everything I know about rotations*, and a lot more besides) from @Void Singer, who is sadly missed. *not forgetting @Grandma Batesand @Chalice Yao. But Void patiently laid the foundations.
  23. If the script is adding data to a list every ten seconds, I wonder if that might not cause a stack heap collision after a few hours if the script isn't properly monitoring script memory and pruning old list items when necessary. That's the first thing I'd look at, anyway, based on the bare fact that something that collects and stores data seems to become unresponsive every few hours.
  24. Where does the pale green come into it? I'd always thought it's simply "pale" ("deathly pale" in the Jerusalem Bible, apparently).
×
×
  • Create New...