Ich wollte für eine Tag und Nacht änderung die VISIBLE flag der beiden Sky Entitys setzen, bzw. entfernen, es funktionierte allerdings nicht.
function time()
{
while(1)
{
wait(-1);
time += 1;
}
if(time>12)
{
if(time<12)
{
reset(sky_1,VISIBLE);
set(sky_2,VISIBLE);
wait(1);
}
while(time>12)
{
reset(sky_2,VISIBLE);
set(sky_1,VISIBLE);
wait(1);
}
wait(1);
}
}
Hier die beiden Entitys:
ENTITY* sky_1 =
{
type = "himmel.png";
layer = 103;
u = 0.7;
v = 0.7;
scale_x = 0.5;
scale_y = 0.5;
tilt = -200;
flags2 = SKY| DOME | VISIBLE;
}
ENTITY* sky_2 =
{
type = "himmel2.png";
layer = 102;
u = 0.7;
v = 0.7;
scale_x = 0.5;
scale_y = 0.5;
tilt = -200;
flags2 = SKY| DOME ;
}
Könnte es sein dass sich set und reset nicht auf flags2? auswirkt?
Und hat eventuell jemand eine kürzere Variante?
Danke