Jump to content
SkyeMariner

Freezing An Avatar Temporarily

Recommended Posts

I'm sure this question has probably been asked numerous times but I can't find the relevant threads.

What is the simplest way to script freezing an avatar in place for a few seconds?  I'm happy to use lsl or resort to rlv commands.

I can rez an invisible object and force sit with rlv and a suitable animation but I'm sure there must be something way simpler that I am blind to. The avatars will be wearing an attachment so I can script in that.

Share this post


Link to post
Share on other sites
Posted (edited)

Have target agent wear a scripted attachment that does:

llRequestPermissions() and PERMISSION_TAKE_CONTROLS

llTakeControls(0xffffffff,TRUE,FALSE); in run_time_permissions()

 

This just blocks them from using controls. It won't freeze them mid-air during a jump/fall. That would also require using:

llMoveToTarget(llGetPos(),0.044444); or slightly higher tau input

Edited by Lucia Nightfire
  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)

Tread carefully here - because something like this can very easily venture into griefing territory. It would be advisable to make sure all who participate in this are aware of what's going on and agree to it. Otherwise you may find yourself on the receiving end of abuse reports.

There are a few approaches, though all of them have different drawbacks and limitations. I don't think any of them are any simpler than what you are already doing - though I am not familiar with using RLV.

llTakeControls has the ability to disable avatar movement controls depending on the value of the pass_on parameter. Although even when "frozen" like this, the avatar can still rotate in place via mouselook. And this does not disable the Flight control (though if it's disabled on the parcel, that can help). This also won't stop the avatar from being pushed around by external forces like gravity or other avatars/objects. I suppose you could have your attachment take controls, play the animation, and rez an invisible cage around them for the duration to prevent outside interference.

Another approach is to use llSitOnLink to force the target to sit on an invisible object (doesn't need to be a cage in this case). Combine that with PRIM_ALLOW_UNSIT to prevent them from prematurely standing up. Call llUnsit when the frozen period expires to free them. But llSitOnLink and PRIM_ALLOW_UNST only work if the objects and avatars in question are part of an Experience and on land that allows said Experience.

Edit: what Lucia said. :)

Edited by Fenix Eldritch
too slow

Share this post


Link to post
Share on other sites

Yes Fenix, it would definitely be consensual, via the attachment they have chosen to wear. llTakeControls looks like the answer, thanks to both of you.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...