Matrixpro
Hi ich habe hier die tuts gelesen und bekomme es auch hin eine tür von beiden seiten zu öffnen das auch mehrmals, aber logischer weise brauche ich mehr türen wie muss ich das jetzt aber im scrip einfügen... hier mal das scrip was ich habe das auch funzt..
main()
{
thread door();
}
door()
{
level.door_open = false;
thread door_trigger_right();
thread door_trigger_left();
}
door_trigger_right()
{
door = getent ("door","targetname");
door_trigger_right = getent ("door_trigger_right","targetname");
while (1)
{
door_trigger_right waittill ("trigger");
if (level.door_open == true)
{
thread door_trigger_left();
return;
}
else if (level.door_open == false)
{
level.door_open = true;
door rotateyaw (90,2);
door waittill ("rotatedone");
wait 5;
door rotateyaw (-90,2);
door waittill ("rotatedone");
level.door_open = false;
thread door_trigger_right();
thread door_trigger_left();
return;
}
}
}
door_trigger_left()
{
door = getent ("door","targetname");
door_trigger_left = getent ("door_trigger_left","targetname");
while (1)
{
door_trigger_left waittill ("trigger");
if (level.door_open == true)
{
thread door_trigger_right();
return;
}
else if (level.door_open == false)
{
level.door_open = true;
door rotateyaw (-90,2);
door waittill ("rotatedone");
wait 5;
door rotateyaw (90,2);
door waittill ("rotatedone");
level.door_open = false;
thread door_trigger_left();
thread door_trigger_right();
return;
}
}
}
was muss ich machen wenn meine nächste tür door1 heist..
wäre auch nett wenn einer erklären könnte wofür diese zeichen da sind bzw was sie bewirken ( { } ; usw... ) wo kann man sowas nachlesen.. ich hoffe das mir einer helfen kann. cu
main()
{
thread door();
}
door()
{
level.door_open = false;
thread door_trigger_right();
thread door_trigger_left();
}
door_trigger_right()
{
door = getent ("door","targetname");
door_trigger_right = getent ("door_trigger_right","targetname");
while (1)
{
door_trigger_right waittill ("trigger");
if (level.door_open == true)
{
thread door_trigger_left();
return;
}
else if (level.door_open == false)
{
level.door_open = true;
door rotateyaw (90,2);
door waittill ("rotatedone");
wait 5;
door rotateyaw (-90,2);
door waittill ("rotatedone");
level.door_open = false;
thread door_trigger_right();
thread door_trigger_left();
return;
}
}
}
door_trigger_left()
{
door = getent ("door","targetname");
door_trigger_left = getent ("door_trigger_left","targetname");
while (1)
{
door_trigger_left waittill ("trigger");
if (level.door_open == true)
{
thread door_trigger_right();
return;
}
else if (level.door_open == false)
{
level.door_open = true;
door rotateyaw (-90,2);
door waittill ("rotatedone");
wait 5;
door rotateyaw (90,2);
door waittill ("rotatedone");
level.door_open = false;
thread door_trigger_left();
thread door_trigger_right();
return;
}
}
}
was muss ich machen wenn meine nächste tür door1 heist..
wäre auch nett wenn einer erklären könnte wofür diese zeichen da sind bzw was sie bewirken ( { } ; usw... ) wo kann man sowas nachlesen.. ich hoffe das mir einer helfen kann. cu