Jump to content
  • 0
Sign in to follow this  
Sally Ellisson

Is there a script that prevents sitting on a prim?

Question

  • 0

 


//Unsit on Sit, requires a sit target

default

{

    state_entry()

    {

        llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION); //needed for llAvatarOnSitTarget to work. The vectors components must not all be set to 0.

    }

    changed(integer change) //event changed

    {

        if (change & CHANGED_LINK) //event changed and it has something to do with linking or avatar sitting

        {

            key user = llAvatarOnSitTarget();

            if (user) //the changed event is an avatar sitting

                llUnSit(user); //unsit the avatar on the sit target

        }

    }

}

 

Put this script in any prim and no one can sit. It will unsit them

You can also Look In The Scripting Library Forums for cool stuff :)

http://community.secondlife.com/t5/LSL-Scripting-Library/bd-p/LSLScriptingLibrary

 

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

 


//Unsit on Sit, requires a sit target

default

{

    state_entry()

    {

        llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION); //needed for llAvatarOnSitTarget to work. The vectors components must not all be set to 0.

    }

    changed(integer change) //event changed

    {

        if (change & CHANGED_LINK) //event changed and it has something to do with linking or avatar sitting

        {

            key user = llAvatarOnSitTarget();

            if (user) //the changed event is an avatar sitting

                llUnSit(user); //unsit the avatar on the sit target

        }

    }

}

 

Put this script in any prim and no one can sit. It will unsit them

You can also Look In The Scripting Library Forums for cool stuff :)

http://community.secondlife.com/t5/LSL-Scripting-Library/bd-p/LSLScriptingLibrary

 

 

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
Answer this question...

×   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.

Sign in to follow this  

×
×
  • Create New...