Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotation / Wind; Is this possible?

Tex Nasworthy
Udder Disgrace
Join date: 2 Sep 2006
Posts: 1,330
09-18-2007 08:31
I'm very new to scripting and was hoping someone could tell me if what I'd like to do is even possible with a script or series of scripts.

Basically I have a fan blade I want to rotate around it's central axis. At the same time I would like the rotating fan blade to rotate around an axis perpendicular to that central axis so that it always faces the wind.

If that's not clear, have a look at the attached JPG.

In the JPG I'd like the green blades and blue cylinder to rotate around the long axis of the blue cylinder.

At the same time I'd like the entire assembly to rotate around the long axis of the red cylinder so that it faces the wind.

So, here's my question(s);

1. Is this possible?
2. Are there any scripters interested in writing this script for me?
3. What would you charge to write this script?

Thanks in advance for any answers or comments,
Tex
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
09-18-2007 09:54
See this excellent article:

http://eowyn.bigpondhosting.com/SecondLife.html
Tex Nasworthy
Udder Disgrace
Join date: 2 Sep 2006
Posts: 1,330
That should keep me busy for a while.
09-18-2007 11:09
Thanks a ton, Debbie.

Just gave it a glance and it is exactly what I'm looking for.
Looks like I have a little reading and studying to do.

Thanks again,
Tex
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
09-18-2007 18:50
Oh my. That's quite a windmill in the tutorial.

I was much lazier for the weathervane over my barn. In the root prim (a flattened cube that should have a rooster textured on it, corresponding to the blue cylinder in the jpg) I just have:

CODE

float TIMER_INTERVAL = 2.0;

default
{
state_entry()
{
llSetTimerEvent(TIMER_INTERVAL);
}
timer()
{
vector wind = llWind(ZERO_VECTOR);
llMessageLinked(LINK_ALL_OTHERS, 0, (string)llVecMag(wind), NULL_KEY);
llRotLookAt(llEuler2Rot(<0,0,llAtan2(wind.y, wind.x)>), 1.0, 1.0);
}
}


and in the child prim (a severely dimpled sphere, textured to look like multiple fan blades):

CODE

default
{
link_message(integer sender_num, integer num, string str, key id)
{
llTargetOmega(<1, 0, 0>, (float)str, 1.0);
llSetText("Wind Speed: "+str, <1,1,1>, 1.0);
}
}


... or, one could do it right, I suppose. :p
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
09-18-2007 19:16
From: Tex Nasworthy

2. Are there any scripters interested in writing this script for me?
3. What would you charge to write this script?

I know that your problem has been solved in this instance but for the future:

Hang in there on the scripting Tex, you'll get the hang of it. No need to pay anyone. Have an idea and you don't know where to start then we can point you in the right direction. If you have trouble with a spot then post what you have here and we can help you figure it out.

If I can learn to script, then anyone can:-)
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum