Beiträge: 241
	Themen: 23
	Thanks Received: 215 in 124 posts
Thanks Given: 1.360
	Registriert seit: Apr 2023
	
	
 
	
		
		
 
		25.12.2023, 05:31 
	
	 
	
		Hab stundenlang vergeblich gesucht, gibt es das irgendwo?
	
	
	
Archetyp Jung
	
		
	
 
 
	
	
	
		
	Beiträge: 7.326
	Themen: 798
	Thanks Received: 1.853 in 896 posts
Thanks Given: 4.218
	Registriert seit: Jul 2010
	
	
 
	
	
		Hallo Arche ;D
Vielleicht wäre ein bisschen mehr Info, was genau der Ventalitor machen soll, nicht schlecht ;D
	
	
	
	
		
	
 
 
	
	
	
		
	Beiträge: 241
	Themen: 23
	Thanks Received: 215 in 124 posts
Thanks Given: 1.360
	Registriert seit: Apr 2023
	
	
 
	
		
		
		26.12.2023, 19:35 
(Dieser Beitrag wurde zuletzt bearbeitet: 26.12.2023, 19:38 von DJ Archie.)
	
	 
	
		Suche nunmehr zweierlei, zum einen ein Schwenk-Skript, es soll dazu dienen, eine Kombination aus Plakat und Besucherdisplay horizontal im Viertelkreis von links nach rechts sowie umgekehrt schwenken zu lassen, zum anderen such ich Tisch- und Standventilatoren, die schwenken ja auch. 
	 
	
	
Archetyp Jung
	
		
	
 
 
	
	
	
		
	Beiträge: 241
	Themen: 23
	Thanks Received: 215 in 124 posts
Thanks Given: 1.360
	Registriert seit: Apr 2023
	
	
 
	
		
		
 
		29.12.2023, 05:24 
	
	 
	
		Swing script
Code:
integer swing=FALSE;        //So it starts out NOT swinging
float time=0.1;             //Decreasing this (on it's own) makes the swing move FASTER and vice versa
integer steps=250;           //The total number of steps in the swing's path. More steps=smoother swing. More steps (alone) means slower swing too - time for a complete swing cycle is steps * time (so 4.8 s with the default settings).
integer swingDegrees = 25;  //How far from the vertical the swing moves
//If you play from here on down you might break the script. Do so at your own risk. There are no comments - just to encourage you NOT to play.
integer i=1;
float swingRad;
vector normal;
rotation Inverse(rotation r)
{
    r.x = -r.x;
    r.y = -r.y;
    r.z = -r.z;
    return r;
}
rotation GetParentRot()
{
    return Inverse(llGetLocalRot())*llGetRot();
}
SetLocalRot(rotation x)
{
    llSetRot(x*Inverse(GetParentRot()));
}
default
{
    state_entry()
    {
        normal = llRot2Euler(llGetRot());
        swingRad=DEG_TO_RAD*swingDegrees;
        llSetTouchText("Swing");
    }
    touch_start(integer num)
    {
        if(swing)
        {
            swing=FALSE;
            llSetTouchText("Swing");
        }
        else
        {
            swing=TRUE;
            llSetTouchText("Stop swing");
            llSetTimerEvent(time);
        }
    }
    timer()
    {
        float stepOffset=(float)i/steps*TWO_PI;
        if(i>steps) i=1;
        if(swing==FALSE && (i==steps || i==steps/2))
        {
            llSetTimerEvent(0.0);
            SetLocalRot(llEuler2Rot(<normal.x, normal.y, normal.z + swingRad*llSin(stepOffset)>));
        } else
        {
            SetLocalRot(llEuler2Rot(<normal.x, normal.y, normal.z + swingRad*llSin(stepOffset)>));
            i++;
        }
    }
    moving_end()
    {
        normal=llRot2Euler(llGetRot());
    }
}
 
	 
	
	
Archetyp Jung