Jump to content
You are about to reply to a thread that has been inactive for 68 days.

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

Recommended Posts

hi someone can tell me how can i stop the rotation of an item i bought? I have removed rotation script but it continues to turn uff

Share this post


Link to post
Share on other sites
Posted (edited)

Hi there,

~{NOTE}~
========
This script will make your object spin if you touch it once
and make it stop if you touch it again + it will respond to your commands only.
I hope this helps.

PS: u can modify the rotation speed by editing the speed variable.
cheers.

~{USER GUIDE}~
==============
1. right-click on the object.
2. edit.
3. choose the content tab.
4. click: new script.
5. open the script (called 'New Script').
6. paste the code below.
7. save.
8. left click on the object to trigger the script.

integer switch = 0;
float speed    = 3.14;
default
{
    touch_end(integer n)
    {
        key objOwnerKey   = llGetOwner();
        key objTriggerKey = llDetectedKey(0);
        if (objOwnerKey == objTriggerKey)
        {
            if (switch == 0)
            {
               llTargetOmega(llRot2Up(llGetLocalRot()), speed, 1.0);
               switch = 1;
            }
            else
            {
               llTargetOmega(llRot2Up(llGetLocalRot()), 0, 1.0);
               switch = 0;
            }
        }
    }
}

 

 

Edited by Eth3l
correction.

Share this post


Link to post
Share on other sites
Posted (edited)

You can find "scrubber" scripts that remove prim properties such as this smooth rotation (llTargetOmega).

All you really need is a script that executes

llTargetOmega(ZERO_VECTOR, 0.0, 0.0);

in state_entry() to make it stop, then you can remove the script.

[ETA, just FYI: This isn't a bug or anything, it's a smart engineering decision to make these features controlled by script but not requiring a script to remain in the object for the feature to persist. It saves significant region resources when all the constant smooth rotation, texture animation, etc. keep working when scripts are removed -- as long as people remove the scripts. And, of course, it confuses the heck out of people the first time they encounter it.]

Edited by Qie Niangao
  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)
9 minutes ago, Fritigern Gothly said:

What?

What "what"?  It looks like your monitor has dropped off the deep end and locked you into dark mode.

Incidentally,  @D4N4E, it sounds like your script is spinning something with llTargetOmega. (Not "rotating", BTW, which is something else.) If so, you can't stop it easily,  That's a prim property.  It can only be started or stopped by a script, and it doesn't require a script to keep it going.  If you removed the script that was in it, the only way  you are likely to get the spinning to stop is to drop a new script in it to do the job.  A script like this:

default
{
    state_entry()
    {
        llTargetOmega(ZERO_VECTOR, 0.0,0.0);
        llRemoveInventory(llGetScriptName());
    }
}

That script should stop the spinning and then immediately remove itself.

EDIT:  Heh.  Qie got here first.  :)

Edited by Rolig Loon
  • Like 2

Share this post


Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 68 days.

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

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