Code: Select all
int controller = 0;
script "Countdown" (void)
{
SetActivator(0, AAPTR_PLAYER1);
Hudmessage(s:"The main core is going to be shut down in T-60 seconds"; HUDMSG_PLAIN, 2, CR_SAPPHIRE, 0.5, 0.4, 7.6);
Delay(280);
GiveInventory("Time", 60);
ACS_NamedExecute("RealCountDown", 0);
}
Script "RealCountDown" (void)
{
SetActivator(0, AAPTR_PLAYER1);
controller = 0.0;
ACS_NamedTerminate("Objective", 0);
int second = CheckInventory("Time");
while(second > 0)
{
SetHudSize(640, 480, 1);
TakeInventory("Time", 1);
second = CheckInventory("Time");
HudMessage(s:"New Objective:"; HUDMSG_PLAIN, 0, CR_RED, 10.0, 80.0, 1.0);
HudMessage(s:"Survive For:"; HUDMSG_PLAIN, 0, CR_white, 0.0, 90.0, 1.0);
HudMessage(d:second, s:" seconds"; HUDMSG_PLAIN, 0, CR_white, 0.0, 100.0, 1.0);
delay(35);
}
Thing_Destroy(100, 1);
Terminate;
}
Script "Objective" (void)
{
SetHudSize(640, 480, 1);
HudMessage(s:"Objective:"; HUDMSG_PLAIN, 0, CR_RED, 0.0, 80.0, controller);
HudMessage(s:"Find a way to break brainwash"; HUDMSG_PLAIN, 0, CR_WHITE, 67.0, 90.0, controller);
HudMessage(s:"Do not kill Friendlies"; HUDMSG_PLAIN, 0, CR_WHITE, 29.0, 100.0, controller);
}