From 9d77289574cf8e410ec66264c1d7bd542fa5d6d7 Mon Sep 17 00:00:00 2001 From: x3Karma Date: Wed, 11 May 2022 20:22:08 +0800 Subject: Update _gamemode_fd.nut (#353) - prevent final wave scoring by setting victory condition first - added CreateTickEvent, SpawnTick, CreateTrackedDroppodTick functions - fixed Arc Titans not spawning correctly - fixed Nuke Titans not moving --- .../scripts/vscripts/gamemodes/_gamemode_fd.nut | 76 +++++++++++++++++++--- 1 file changed, 66 insertions(+), 10 deletions(-) (limited to 'Northstar.CustomServers/mod/scripts/vscripts') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut index fac1de81..58f497a6 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut @@ -14,6 +14,7 @@ global function createDroppodStalkerEvent global function createDroppodSpectreMortarEvent global function createWaitUntilAliveEvent global function createCloakDroneEvent +global function CreateTickEvent global struct SmokeEvent{ vector position @@ -415,6 +416,15 @@ bool function runWave(int waveIndex,bool shouldDoBuyTime) wait 2 //wave end + + if ( isFinalWave() && IsAlive( fd_harvester.harvester ) ) + { + //Game won code + SetRoundBased(false) + SetWinner(TEAM_MILITIA) + return true + } + SetGlobalNetBool("FD_waveActive",false) MessageToTeam(TEAM_MILITIA,eEventNotifications.FD_AnnounceWaveEnd) if(waveIndex ) + SetTeam( pod, team ) + InitFireteamDropPod( pod ) + waitthread LaunchAnimDropPod( pod, "pod_testpath", origin, <0,0,0> ) + + string squadName = MakeSquadName( team, UniqueString( "ZiplineTable" ) ) + array guys + + for ( int i = 0; i < 4; i++ ) + { + entity guy = CreateFragDrone( team, origin, <0,0,0> ) + + SetSpawnOption_AISettings(guy, "npc_frag_drone_fd") + SetTeam( guy, team ) + guy.EnableNPCFlag( NPC_ALLOW_PATROL | NPC_ALLOW_INVESTIGATE ) + guy.EnableNPCMoveFlag(NPCMF_WALK_ALWAYS) + DispatchSpawn( guy ) + + SetSquad( guy, squadName ) + + if (route != "") + thread titanNav_thread(guy, route) // not working i think + guys.append( guy ) + } + + ActivateFireteamDropPod( pod, guys ) +} + void function PingMinimap(float x, float y, float duration, float spreadRadius, float ringRadius, int colorIndex) { foreach(entity player in GetPlayerArray()) -- cgit v1.2.3