This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Basteln mit Scripten und Prims bewegen
#4
Hallo Dark,

habe das Script nun wie folgt umgeschrieben:

Code:
integer es;
default
{
     state_entry()
     {
         es = 0;
     }
     touch_start(integer total_number)
     {
             vector er = llGetScale();
             if(es == 0)
             {
                 llSetPos(llGetLocalPos() + <1,er.x*0.9,0>);
                 es = 1;
             }
             else
             {
             llSetPos(llGetLocalPos() - <1,er.x*0.9,0>);
                 es = 0;
         }
     }
}


Dies garantiert die einwandfreie Funktion auf der von mir gewünschten Achse. Ich muss allerdings das Verhalten nach dem Sim-Neustart noch austesten.

Jetzt kann man die Schiebetür an jeder beliebigen Wand montieren.

Letzte Anpassung und fertig:

Code:
integer es;
default
{
     state_entry()
     {
         es = 0;
     }
     touch_start(integer total_number)
     {
             vector er = llGetScale();
             if(es == 0)
             {
                 llSetPos(llGetLocalPos() + <1.5,er.x*0.1,0>);
                 es = 2;
             }
             else
             {
             llSetPos(llGetLocalPos() - <1.5,er.x*0.1,0>);
                 es = 0;
         }
     }
}
All done!
Zitieren


Nachrichten in diesem Thema
RE: Basteln mit Scripten und Prims bewegen - von DarkWolf - 20.04.2023, 20:43
RE: Basteln mit Scripten und Prims bewegen - von DarkWolf - 21.04.2023, 09:19
RE: Basteln mit Scripten und Prims bewegen - von ThunderTower - 21.04.2023, 16:34

Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste