Jump to content

Windmill Linked Rotate + wind script needed

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

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

Recommended Posts

I need a script that can do the above. I have a linked build, of 87 prim LI probably at least 50 objects linked, one part is the sail of the windmill, which is a single object. Another part is the cap of the windmill, which I need to move to wind and carry the rotating sail. 


Sail rotating y axis

Cap rotating to wind z axis

Both linked to rest of build.


I have already got two seperate scripts and in fact, various versions of both 'rotate prim' and 'turn to wind' scripts.


However I cannot use these in a linked build, as when the items are linked. If I put one script into blade and one into cap, then they act independently of each other, and if I put both scripts into the blade, then the blade becomes erratic and not simply confined to the z axis when turning to wind, I'm assuming because it reads the north south rotation and the wind rotation and does both at once, rather than seperating them.


I have searched forums, and marketplace, and can only find examples of soft linked items, or scripts that do one thing at a time. 




This page seems to say that it is possible to do what I want to do, however, I am not fluent enough with scripting to make use of it. 


Please if anyone can help IM me in world gwyddion resident, or let me know here. I need script for my amazing windmill creation :D Thank you.

Link to post
Share on other sites

The best bet is to use a windvane script that checks the wind direction every few seconds and then does a straightforward rotation to match it.  Then put the llTargetOmega script into the blades and let them rotate around their own axis (or, better, combine the two scripts into a single one and just aim the blade's part of the job with [PRIM_OMEGA] in llSetLinkPrimitiveParams).  If you're not up to the task of scripting it yourself, the place to find a scripter to hire is in the InWorld Employment forum. 

Link to post
Share on other sites
  • 3 weeks later...

This script will do what you ask but the prim you put this in must not be the base/parent prim.  It will only rotate the prim that it is in.  It is the very same one I'm using in my windmill.


integer ON;default{    touch_start(integer num)    {        ON = !ON;        if(ON)        {            rotation MyRot = llGetLocalRot();            llTargetOmega(<0,0,.1>*MyRot,TWO_PI,1.0);        }        else        {            llTargetOmega(<0,0,0>,TWO_PI,1.0);        }    }}


Link to post
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...