Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help?! what makes this spin?

LeVey Palou
Registered User
Join date: 31 Aug 2006
Posts: 131
10-14-2006 19:20
Hi

I am building a dance floor and snagged a fog script from a free fogger at yadni's. so far so good it only for my own use.

the lil fogger i stole it from spun when it was activated. when i put the script in my floor panels now they spin when activated. kinda cool but not what i wanted...lol.

can somebody plz tell me what in this script makes the object spin? I cant undersdtand it. the rest of the script makes sense i just dont see what is initiating the spin at all????

okay plz advise and ty!



key SMOKE_SPRITE = "b85073b6-d83f-43a3-9a89-cf882b239488";

float SPRITE_SIZE = 3.0;
float LIFETIME = 10.0;
integer NUM_PARTICLES = 20;
// What initial velocity magnitude should particles have (in meters/s)?
float SPRITE_VELOCITY = 0.15;
// Width of cone (in Radians) about the object's Z axis where particle will be directed
float ARC = 2.0;
// Offset distance from the object center to generate the system
vector OFFSET = <0,0,0>;

default
{
state_entry()
{

//llGiveInventory(llGetOwner(), "Party Fogger Instructions";);
state stopped;
}


}
state smoking
{
state_entry()
{
llWhisper(0, "Fogger on";);
llSetTimerEvent(2.0);
llTargetOmega(<0,0,1>, 2, 2);
}

touch_start (integer num_detected)
{
llSetTimerEvent(0.0);
state stopped;
}
timer()
{
if (llFrand(1.0) < 0.5)
{
//
// Make some smoke
//
llMakeSmoke( NUM_PARTICLES, 1.0, 0.2,
LIFETIME, 1.0, SMOKE_SPRITE, OFFSET);
}
}
}

state stopped
{
state_entry()
{
llTargetOmega(<0,0,1>, 0, 0);
llWhisper(0, "Fogger off";);
}
touch_start (integer num_detected)
{
state smoking;
}
}
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-14-2006 19:27
llTargetOmega(<0,0,1>, 2, 2);

That's it, that is all that is need to make something spin. You can adjust the values there.
Here is the link for the wiki page on llTargetOmega:

http://www.lslwiki.com/lslwiki/wakka.php?wakka=llTargetOmega
_____________________
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
LeVey Palou
Registered User
Join date: 31 Aug 2006
Posts: 131
10-14-2006 19:42
Ty so very much for the feedback! can't tell ya how this was bugging me. YaaaaaY! Woot!
DoctorMike Soothsayer
He's not a real doctor.
Join date: 3 Oct 2005
Posts: 113
deprecated
10-14-2006 20:37
Isn't llMakeSmoke deprecated now?

Stand still for the Thought Police...

...They are coming.

Try out llParticleSytem

http://www.lslwiki.com/lslwiki/wakka.php?wakka=llParticleSystem

Be there, or be a two dimensional cube!
_____________________
Performance Artist and educator
"Thinking outside the Prim"