Moin.
Ich möchte das sich meine Rundumleuchte auf Befehl dreht und diese Drehung endlos wiederholt, bis der Spieler diese über Menü beendet.
Die loop-Schleife in der Model.cfg arbeitet, dies konnte ich im O2 feststellen. Es scheint also ein Problem mit der configg.cpp zu sein.
Mdel.cfg
Code:
....
class blaulicht {
type="rotation";
source="blaulicht";
selection="reflektor";
axis="reflektor_achse";
sourceAddress="loop";
memory = 1;
angle0=rad 0;
angle1=rad 360;
};
...
config.cpp
Code:
...
class AnimationSources {
class blaulicht {
scope = 2;
sourceAddress="loop";
source = "user";
animPeriod = 1.2; /* Dauer der Animation in Sekunden */
initPhase = 0; /* Startpositon der Animation: "0" Entspricht dem
};
};
class UserActions{
class blaulicht{
scope = 2;
displayName="$STR_lichtan";
onlyforplayer = true;
position="benutze";
radius=5;
condition="this animationPhase ""blaulicht"" == 0";
statement="this animate [""blaulicht"", 1] ";
//statement="this execVM ""\test\gelblicht.sqf""; ";
};
class blaulicht_aus : blaulicht{
displayName="$STR_lichtaus";
condition="this animationPhase ""blaulicht"" > 0";
statement="this animate [""blaulicht"", 0]";
};
...
Wenn einer eine scriptidee via *.sqf hat, gerne her damit, dann rufe ich halt in script auf.
Gruß