Jump to content

Minor LSL functions I'd like to have.


animats
 Share

You are about to reply to a thread that has been inactive for 1942 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

"Nice to have" features. Perhaps a task for a new LL hire to implement to get them familiar with the system internals.

  • Proposed: llEntryDanger(vector pos) - returns TRUE if you can't go there. Checks for no-script, ban lines, edge of world, avatar on vehicle blocked, object entry blocked. Like llScriptDanger and llParcelFlags, but more useful. Neither of those give you enough info to be sure it's safe. Use case: vehicles.
  • In a "changed" event call with CHANGED_LINK set, signalling an unsit, the object previously sat on should retain permissions over the avatar until the end of the "changed" event. This would allow graceful unsits with animation. The last act of a sit script could then include placing the avatar properly on the ground, instead of atop the chair or bed. Many objects have great animations for sitting down or getting into a vehicle, but getting out looks like a mess.
  • llGetSimStats needs more constants, so that more of the sim statistics can be retrieved. Right now, all you can get is pathfinding steps executed as a percent value. Total scripts, scripts run, etc. would be useful. Partly for monitoring, and partly to tell when some things should shut down.
  • Proposed: llGetDynamicPath. Like llGetStaticPath, but uses the dynamic pathfinding mesh. Useful for when you want to do pathfinding but want more control over path execution. If there's an obstacle in the way, do you avoid, wait, or attack? Depends on the character's role. Also useful for working around pathfinding bugs.
Link to comment
Share on other sites

some of my nice to haves

integer llParcelAccessQuery(key avatarid) - returns PARCEL_ACCESS_OPEN or PARCEL_ACCESS_CLOSED. And PARCEL_ACCESS_ALLOWED or PARCEL_ACCESS_BANNED. Returns open or closed (set according to general and/or group parcel access settings) for this avatar when avatar not found on Allowed or Banned lists. With this query ability it completes the existing Parcel access Add/Remove capabilities

llGroupAdd(key groupid, key avatarid, list levels) - list levels being a list of strings. When a string value is not found to match a group level name then ignore. When levels is [] then add to Everyone only. Closed group owners would love to have this

llGroupRemove(key groupid, key avatarid) - reverse of group add

  • Like 1
Link to comment
Share on other sites

The "CHANGED_LINK for unsits" is a good one for further action, as I've recently had scripts begin to throw a "trying to stop animation but permissions not set" error, which I have narrowed down to those viewers which support revoking permission on standing.

It isn't completely clear what is going on here though as several times I could force the script error if the avatar TP-ed away without unsitting first, and established it never happened if the avatar logged whilst seated, so it would help things if there was a rework of the unsit. It would also be nice to use this defined gap to set chairs phanton and nudge the standing avatar out of them before setting them back to non-phantom.

(The issue I am seeing might be associated with the scripts run low percentage though as the problem was first spotted in one such region, and similar scripts in a region with 100% scripts run doesn't seem to throw the same issues in the limited testing I've done.)

Link to comment
Share on other sites

1 hour ago, Kyrah Abattoir said:

Not a default setting normally so I'd just blame the user for messing with something they don't understand.

I'd love to, but it's not them who gets the script error message, it's the owner. And there ought to be a way of working out do you need to stop the animation? I know the long way round is to get the list of all animations playing on the avatar and stepping through them looking for those matching the keys of the ones the script started, but I wanted a much simpler bit of code. I have always stopped the last animation the script had started, but recently avatars TP-ing away or logging whilst still sitting have been throwing these errors which I haven't had to deal with before. I don't know if it's an increase in the numbers using TPV's, a slow down in script time, or a subtle change Linden have made (I saw that the recent rollouts have now allowed touches by left-click onto worn mesh, for instance).

Link to comment
Share on other sites

6 minutes ago, Profaitchikenz Haiku said:

I'd love to, but it's not them who gets the script error message, it's the owner. And there ought to be a way of working out do you need to stop the animation? I know the long way round is to get the list of all animations playing on the avatar and stepping through them looking for those matching the keys of the ones the script started, but I wanted a much simpler bit of code. I have always stopped the last animation the script had started, but recently avatars TP-ing away or logging whilst still sitting have been throwing these errors which I haven't had to deal with before. I don't know if it's an increase in the numbers using TPV's, a slow down in script time, or a subtle change Linden have made (I saw that the recent rollouts have now allowed touches by left-click onto worn mesh, for instance).

You can check if you still have the permissions before trying to stop it.

llGetPermissions/llGetPermissionsKey that should at least suppress the error?

  • Like 1
Link to comment
Share on other sites

A useful pair of proposed functions:

  • float llGetAutoreturnTime(key k)  - returns number of seconds until autoreturn happens. Anyone can use this.
  • llSetAutoreturnTime(key k, float secs) - extends autoreturn time. Requires same parcel owner permissions as llReturn.

These are for security orbs and parking lot managers, to perform those functions gracefully.

Here's how a store parking lot would work. You buy a parking lot, with asphalt, painted lines, and a sign "Free parking while shopping", and put it next to your store. You set autoreturn to your parcel to 2 minutes.

The parking lot script notices when a vehicle drives onto the lot, using a collision_start event. It extends the vehicle's autoreturn time to 10 minutes or so, and notes the UUIDs of the avatars that just arrived. Once a minute, it checks to see if the avatars are still in the area. If they are, it extends the autoreturn time some more. As long as an avatar from the vehicle sticks around, the vehicle will not autoreturn. If they leave the parcel briefly, or get logged out accidentally, they have 10 minutes to come back. Customers feel no time pressure. Might have a limit at 8 hours or so, to prevent someone living in a camper on your lot.

The "get autoreturn time" function is useful for vehicles. They can warn their driver that they're about to be autoreturned. You could even have an accessory you wear, like a bracelet, that warns you when the last vehicle you rode in is about to be autoreturned. Gives you a chance to get back to your ride.

A user-friendly security orb. Object litter is gone in 2 minutes. Legitimate visitors are not hassled.

Edited by animats
typo
Link to comment
Share on other sites

*Tween commands
llSetLinkPrimitiveParamsFastTween( integer id, list params, (optional)float time);
llSetPosTween (vector pos, (optional)float time);
llSetRotTween ...
llSetLocalRotTween ...
llSetRotationTween ...
llSetLinkRotationTween ... 
llScaleTextureTween ...
llOffsetTextureTween ... 
llRotateTextureTween ...
llSetAlphaTween ...
llSetColorTween ...

Where possible tween between existing primitive param and new param over time and/or steps Command is sent and control returned to script while object plays out it's steps.

Execute the tween steps visually on the client to interpolate so they appear fluid and smooth.

Caps for update frame rate region side can be set by LL.

 

  • Like 2
Link to comment
Share on other sites

Improved llSameGroup, integer llAvInGroup( key av, key group ) with caveats same parcel only and  that script owner must also be in searched for group (ie no bypassing hidden groups) . Save all that group member checking workaround malarky when prim can't be set to target group.

  • Like 1
Link to comment
Share on other sites

What I would really use most of all is a function llGetChildInventoryList(integer LinkNum) to let bme check on what's got what in a large linkset without having to slog through them all in the contents tab.

Thinking it through, it would have to return a list of the form [string inventoryItemName, integer INVENTORY_TYPE, ...]

The ,more I think about it,. the more I want this.

Edited by Profaitchikenz Haiku
Link to comment
Share on other sites

4 hours ago, mikka Luik said:

Improved llSameGroup, integer llAvInGroup( key av, key group ) with caveats same parcel only and  that script owner must also be in searched for group (ie no bypassing hidden groups)

agree that any new group functions would need some checks on the owner of the script and their relationship to the parcel group. A way could be to add a Group Developer option to groups - similar to Experience Developer.  Or if this isn't possible then maybe the new group functions could be done as Experience functions so to establish the relationship

Link to comment
Share on other sites

16 minutes ago, Ivanova Shostakovich said:

   Rather than flinging prims at avatars that then disappear, llDamageAgent() would be handy for creating an environmentally hazardous area in which an agent takes damage.

That you can do already by having the environment hazards fling invisible damage-enabled prims at agents who come too close or who collide with the hazard, can't you?    It's a lot more convoluted than your proposal but you can fake the effect quite well, I think.

Link to comment
Share on other sites

11 hours ago, CoffeeDujour said:

I'd like to see all 'auto generated' LODs trashed, and your viewer rolls them on the fly as meshes come in. Not only does that put it entirely in your control, it makes it possible for the decomposition in use to be improved with time.

Beq Janus has considered generating impostor objects at runtime. I looked into generating them at upload time. This is a big, complex subject, not a quick minor feature. SL really does need to do distant objects better to keep the viewer from choking.

Link to comment
Share on other sites

9 hours ago, Innula Zenovka said:

That you can do already by having the environment hazards fling invisible damage-enabled prims at agents who come too close or who collide with the hazard, can't you?    It's a lot more convoluted than your proposal but you can fake the effect quite well, I think.

The downside is that you still have to 1) rez things, and/or 2) rely on physics. Having an object and a script rez and be initialized just for ~1 second's worth of functionality before it's killed and repeated again isn't very ideal. Especially if it's supposed to be like a general area (imagine a toxic cloud) and you can't rely on the collision event and need one or more repeating sensors.

  • Like 2
Link to comment
Share on other sites

11 hours ago, animats said:

Beq Janus has considered generating impostor objects at runtime. I looked into generating them at upload time. This is a big, complex subject, not a quick minor feature. SL really does need to do distant objects better to keep the viewer from choking.

I'd argue it needs to go do nearby objects better. Rezzed stuff can be bad (see kitty's house), but the biggest fps hog is rezzed avatars .. wearing shoes (and don't ever underestimate just how much impact your own avatar has).

All avatar components are uploaded at resolutions high enough to be seen perfectly with the camera zoomed right in, but 99% of the time the whole avatar is less than half your screens height .. with the same poly count.

 

Link to comment
Share on other sites

3 hours ago, CoffeeDujour said:

All avatar components are uploaded at resolutions high enough to be seen perfectly with the camera zoomed right in, but 99% of the time the whole avatar is less than half your screens height .. with the same poly count.

Yeah but, we're all so beautiful...

 

Edited by Profaitchikenz Haiku
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1942 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...