Code: Select all
script 2 OPEN
{
while(True)
{
delay(2);
if (GetLevelInfo(LEVELINFO_KILLED_MONSTERS) == GetLevelInfo(LEVELINFO_TOTAL_MONSTERS))
{
setfont ("BIGFONT");
hudmessage(s:"Level Complete"; HUDMSG_PLAIN, 0, CR_WHITE, 0.5, 0.5, 0);
delay (120);
Teleport_NewMap (1, 0, 0);
}
}
}Why does it not work without the delay in it.
(when there was no delay it simply did nothing when all the monsters were dead, but then for debugging purposes I put in an else statement that simply printed "stuff", and I noticed it didn't continue printing the message indefinitely)
So, i'm also wondering, if the script stopped working after a sertain length of time when there was no dilay, will this script with the delay in it allways work?
(if something in what I said is unclear, please say so)
