Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
197 lines
5.3 KiB
Plaintext
197 lines
5.3 KiB
Plaintext
fsm StockSiegeAssault : integer;
|
|
|
|
const
|
|
#include_ <content\ABLScripts\mwconst.abi>
|
|
|
|
type
|
|
#include_ <content\ABLScripts\mwtype.abi>
|
|
|
|
var
|
|
static ObjectID Blue_goal1;
|
|
static ObjectID Blue_goal2;
|
|
static ObjectID Red_goal1;
|
|
static ObjectID Red_goal2;
|
|
|
|
static integer Blue_score_add;
|
|
static integer Red_score_add;
|
|
|
|
static integer Blue_Guard_team;
|
|
static integer Red_Guard_team;
|
|
|
|
static boolean Winning;
|
|
static boolean RedHQ; // This is whether the Red HQ building is alive
|
|
static boolean RedComm; // This is whether the Red Comm building is alive
|
|
|
|
// Timers
|
|
static integer game_timer;
|
|
static integer pause_timer;
|
|
static integer toggler; // This makes it so there is a lengthier pause b/n some sounds
|
|
|
|
function PlayBigAlerts;
|
|
code
|
|
PlayTeamBettySound(1,SOUND_TRIGGER_MISSILE_LOCKED_ON_ME);
|
|
PlayTeamBettySound(2,SOUND_TRIGGER_MISSILE_LOCKED_ON_ME);
|
|
Return;
|
|
endfunction;
|
|
|
|
function PlaySmallAlerts;
|
|
code
|
|
PlayTeamBettySound(1,SOUND_TRIGGER_NARC_SIGNAL_START);
|
|
PlayTeamBettySound(2,SOUND_TRIGGER_NARC_SIGNAL_START);
|
|
Return;
|
|
endfunction;
|
|
|
|
function init;
|
|
code
|
|
SetupScoring_SiegeAssault;
|
|
|
|
// Goal for Team 1 - Kill this
|
|
GroupAddObject(GroupObjectId(20),ebu_Red_HQ);
|
|
GroupAddObject(GroupObjectId(20),ebu_Red_Communications);
|
|
MarkBuildingAsScorable(ebu_Red_HQ);
|
|
MarkBuildingAsScorable(ebu_Red_Communications);
|
|
|
|
Blue_Guard_team = TeamObjectID(1);
|
|
Red_Guard_team = TeamObjectID(2);
|
|
|
|
Blue_score_add = 350;
|
|
Red_score_add = 350;
|
|
|
|
LogDefendingTeam(team2);
|
|
|
|
// Misc Setup
|
|
winning = false;
|
|
|
|
// Timers
|
|
game_timer = gti_timer_1;
|
|
pause_timer = gti_timer_2;
|
|
|
|
|
|
endfunction;
|
|
|
|
function BlueTeamScores;
|
|
code
|
|
AddPoints(Blue_Guard_team,Blue_score_add);
|
|
endfunction;
|
|
|
|
function RedTeamScores;
|
|
code
|
|
AddPoints(Red_Guard_team,Red_score_add);
|
|
endfunction;
|
|
|
|
state StartState;
|
|
code
|
|
|
|
revealnavpoint(ena_Nav_Center);
|
|
revealnavpoint(ena_Blue_Drop_Zone);
|
|
revealnavpoint(ena_Red_Base);
|
|
TeamSetNav(1,ena_Red_Base);
|
|
TeamSetNav(2,ena_Nav_Center);
|
|
//ChatMessage("Game Starting.");
|
|
|
|
//StartTimer(1); // This is to make sure everyone is in
|
|
StartTimer(3); // This is the defense point timer
|
|
ResetTimer(3);
|
|
StartTimer(4); // This is the timer for the warning messages about buildings
|
|
ResetTimer(4);
|
|
|
|
ResetTimer(Game_Timer);
|
|
trans GoState;
|
|
|
|
endstate;
|
|
|
|
state goState;
|
|
code
|
|
|
|
if (timegreater(game_timer,90)) then
|
|
if (timegreater(3,30)) then
|
|
AddPoints(Red_Guard_team,125);
|
|
LogDefendTimeAward(team2,125);
|
|
PlaySmallalerts;
|
|
ResetTimer(3);
|
|
endif;
|
|
endif;
|
|
|
|
if (GroupAllDead(GroupObjectID(20))) then
|
|
BlueTeamScores;
|
|
PlayBigAlerts;
|
|
ChatMessage("Red Base has been destroyed!");
|
|
// ChatMessage("Respawn 2x slowly in 5");
|
|
ChatMessage("Respawn in 5 seconds.");
|
|
ResetTimer(Pause_Timer);
|
|
trans deadstate;
|
|
endif;
|
|
|
|
if (timegreater(4,5)) then
|
|
if (not RedComm) then
|
|
if (isshot(GroupObjectID(20))) then
|
|
if (toggler>3) then
|
|
PlayTeamBettySound(2,SOUND_TRIGGER_ALARM1);
|
|
ChatMessage("Red Base buildings are under attack.");
|
|
toggler = 0;
|
|
endif;
|
|
endif;
|
|
endif;
|
|
|
|
if (not RedHQ) then
|
|
if (isdead(ebu_Red_HQ)) then
|
|
BlueTeamScores;
|
|
PlayTeamBettySound(1,SOUND_TRIGGER_ALARM2);
|
|
PlayTeamBettySound(2,SOUND_TRIGGER_ALARM2);
|
|
ChatMessage("Red HQ has been destroyed.");
|
|
RedHQ = true;
|
|
endif;
|
|
endif;
|
|
|
|
if (not RedComm) then
|
|
if (isdead(ebu_Red_Communications)) then
|
|
BlueTeamScores;
|
|
PlayTeamBettySound(1,SOUND_TRIGGER_ALARM2);
|
|
PlayTeamBettySound(2,SOUND_TRIGGER_ALARM2);
|
|
ChatMessage("Red Communications has been destroyed.");
|
|
RedComm = true;
|
|
endif;
|
|
endif;
|
|
|
|
Toggler = Toggler + 1;
|
|
|
|
resettimer(4);
|
|
endif;
|
|
|
|
endstate;
|
|
|
|
state deadState;
|
|
code
|
|
|
|
if (timegreater (pause_timer,5)) then
|
|
LogHQDestroyed(team2,team1);
|
|
LogMMapRespawn;
|
|
Winning = False;
|
|
RedComm = False;
|
|
RedHQ = False;
|
|
RespawnMission;
|
|
ResetTimer(Pause_timer);
|
|
//ChatMessage("Respawn Done, one more in 5 sec.");
|
|
// ChatMessage("Respawn in 5");
|
|
ChatMessage("Game respawned.");
|
|
// trans RestartState;
|
|
trans Startstate
|
|
endif;
|
|
|
|
endstate;
|
|
|
|
/* state RestartState;
|
|
code
|
|
|
|
if (timegreater (pause_timer,5)) then
|
|
ResetTimer(Game_Timer);
|
|
ResetTimer(Pause_Timer);
|
|
RespawnMission;
|
|
ChatMessage("2nd Respawn done.");
|
|
trans StartState;
|
|
endif;
|
|
|
|
endstate; */
|
|
|
|
endfsm.
|