Nabend.
Da ich nach langer Zeit mal mein DM Script etwas verfeinern möchte, habe ich nun eine Frage dazu.
Ich hab zur Zeit ein Countdown drin der wie folgt aussieht:
public CountDown9()
{
GameTextForAll("~w~9",1000,3);
SetTimer("CountDown8",1000,0);
return 1;
}
public CountDown8()
{
GameTextForAll("~w~8",1000,3);
SetTimer("CountDown7",1000,0);
return 1;
}
public CountDown7()
{
GameTextForAll("~w~7",1000,3);
SetTimer("CountDown6",1000,0);
return 1;
}
public CountDown6()
{
GameTextForAll("~w~6",1000,3);
SetTimer("CountDown5",1000,0);
return 1;
}
public CountDown5()
{
GameTextForAll("~w~5",1000,3);
SetTimer("CountDown4",1000,0);
return 1;
}
public CountDown4()
{
GameTextForAll("~w~4",1000,3);
SetTimer("CountDown3",1000,0);
return 1;
}
public CountDown3()
{
GameTextForAll("~w~3",1000,3);
SetTimer("CountDown2",1000,0);
return 1;
}
public CountDown2()
{
GameTextForAll("~w~2",1000,3);
SetTimer("CountDown1",1000,0);
return 1;
}
public CountDown1()
{
GameTextForAll("~w~1",1000,3);
SetTimer("CountDownLos",1000,0);
return 1;
}
{
GameTextForAll("~w~9",1000,3);
SetTimer("CountDown8",1000,0);
return 1;
}
public CountDown8()
{
GameTextForAll("~w~8",1000,3);
SetTimer("CountDown7",1000,0);
return 1;
}
public CountDown7()
{
GameTextForAll("~w~7",1000,3);
SetTimer("CountDown6",1000,0);
return 1;
}
public CountDown6()
{
GameTextForAll("~w~6",1000,3);
SetTimer("CountDown5",1000,0);
return 1;
}
public CountDown5()
{
GameTextForAll("~w~5",1000,3);
SetTimer("CountDown4",1000,0);
return 1;
}
public CountDown4()
{
GameTextForAll("~w~4",1000,3);
SetTimer("CountDown3",1000,0);
return 1;
}
public CountDown3()
{
GameTextForAll("~w~3",1000,3);
SetTimer("CountDown2",1000,0);
return 1;
}
public CountDown2()
{
GameTextForAll("~w~2",1000,3);
SetTimer("CountDown1",1000,0);
return 1;
}
public CountDown1()
{
GameTextForAll("~w~1",1000,3);
SetTimer("CountDownLos",1000,0);
return 1;
}
Aufgerufen wird das ganze durch einen Timer. Das geht doch bestimmt auch einfacher. Nur mir fällt da momentan nichts zu ein. Kennt einer vielleicht eine einfachere Methode?