diff options
author | Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> | 2022-07-08 21:00:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 22:00:21 +0200 |
commit | 519c6c40ff7a1aa41075989552d8a5534e49d483 (patch) | |
tree | c8c6b535cb672e4d2c14c7b7611f68d40db64091 /Northstar.CustomServers | |
parent | 827025ea2855ae2695450e153fefe257d30fae23 (diff) | |
download | NorthstarMods-519c6c40ff7a1aa41075989552d8a5534e49d483.tar.gz NorthstarMods-519c6c40ff7a1aa41075989552d8a5534e49d483.zip |
[FD] Give grunts shield captains and anti titan weapons based on difficulty (#412)
* Create function for spawning a shield captain
* give grunts anti titan weapons and captains on higher difficulties
* Add default values to GetCurrentPlaylistVarInt usage
Diffstat (limited to 'Northstar.CustomServers')
3 files changed, 26 insertions, 5 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_spawn.gnut b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_spawn.gnut index 8599f429..26ddf3ca 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_spawn.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_spawn.gnut @@ -26,6 +26,7 @@ global function CreateRocketDroneGrunt global function CreateShieldDrone global function CreateShieldDroneGrunt global function CreateSoldier +global function CreateShieldCaptain global function CreateSpectre global function CreateStalker global function CreateStryder @@ -276,6 +277,11 @@ entity function CreateSoldier( int team, vector origin, vector angles ) return CreateNPC( "npc_soldier", team, origin, angles ) } +entity function CreateShieldCaptain( int team, vector origin, vector angles ) +{ + return CreateNPCFromAISettings( "npc_soldier_shield_captain", team, origin, angles ) // idek +} + entity function CreateProwler( int team, vector origin, vector angles ) { return CreateNPC( "npc_prowler", team, origin, angles ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut index c97c491e..bb18d0bb 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut @@ -4,7 +4,6 @@ global function startHarvester global function GetTargetNameForID - struct player_struct_fd{ bool diedThisRound int scoreThisRound @@ -47,6 +46,7 @@ struct { void function GamemodeFD_Init() { PrecacheModel( MODEL_ATTRITION_BANK ) + PrecacheModel( $"models/humans/grunts/imc_grunt_shield_captain.mdl" ) PrecacheParticleSystem($"P_smokescreen_FD") RegisterSignal( "SniperSwitchedEnemy" ) // for use in SniperTitanThink behavior. @@ -1182,4 +1182,4 @@ void function AddTurretSentry(entity turret) turret.Minimap_AlwaysShow( TEAM_MILITIA, null ) turret.Minimap_SetHeightTracking( true ) turret.Minimap_SetCustomState( eMinimapObject_npc.FD_TURRET ) -} +}
\ No newline at end of file diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd_events.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd_events.nut index fbde5b46..3357d625 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd_events.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd_events.nut @@ -668,9 +668,17 @@ void function spawnDroppodGrunts(SmokeEvent smokeEvent,SpawnEvent spawnEvent,Flo array<entity> guys bool adychecked = false - for ( int i = 0; i < spawnEvent.spawnAmount; i++ ) + for ( int i = 0; i < spawnEvent.spawnAmount; i++ ) { - entity guy = CreateSoldier( TEAM_IMC, spawnEvent.origin,<0,0,0> ) + entity guy + + // should this grunt be a shield captain? + if (i < GetCurrentPlaylistVarInt("fd_grunt_shield_captains", 0)) + guy = CreateShieldCaptain( TEAM_IMC, spawnEvent.origin,<0,0,0> ) + else + guy = CreateSoldier( TEAM_IMC, spawnEvent.origin,<0,0,0> ) + + if(spawnEvent.entityGlobalKey!="") GlobalEventEntitys[spawnEvent.entityGlobalKey+i.tostring()] <- guy SetTeam( guy, TEAM_IMC ) @@ -681,6 +689,13 @@ void function spawnDroppodGrunts(SmokeEvent smokeEvent,SpawnEvent spawnEvent,Flo guy.SetParent( pod, "ATTACH", true ) SetSquad( guy, squadName ) + // should this grunt have an anti titan weapon instead of its normal weapon? + if (i < GetCurrentPlaylistVarInt("fd_grunt_at_weapon_users", 0)) + { + guy.TakeActiveWeapon() + guy.GiveWeapon("mp_weapon_defender") // do grunts ever get a different anti titan weapon? + } + SetTargetName( guy, GetTargetNameForID(eFD_AITypeIDs.GRUNT)) AddMinimapForHumans(guy) spawnedNPCs.append(guy) @@ -688,7 +703,7 @@ void function spawnDroppodGrunts(SmokeEvent smokeEvent,SpawnEvent spawnEvent,Flo } ActivateFireteamDropPod( pod, guys ) - thread SquadNav_Thread(guys,spawnEvent.route) + thread SquadNav_Thread( guys,spawnEvent.route ) } void function spawnDroppodStalker(SmokeEvent smokeEvent,SpawnEvent spawnEvent,FlowControlEvent flowControlEvent,SoundEvent soundEvent) |