aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts
diff options
context:
space:
mode:
authorhummusbird <hummusbirb@gmail.com>2022-01-11 11:42:01 +0000
committerGitHub <noreply@github.com>2022-01-11 08:42:01 -0300
commit7dedffbf358edb4d3b9222c41b3d61b50d8a4e64 (patch)
tree959a8377863e41603a70736edf2d19853f5cd93e /Northstar.Custom/mod/scripts/vscripts
parentced197fb6a49b57a98ae10a1b1bef6153d2b0b38 (diff)
downloadNorthstarMods-7dedffbf358edb4d3b9222c41b3d61b50d8a4e64.tar.gz
NorthstarMods-7dedffbf358edb4d3b9222c41b3d61b50d8a4e64.zip
One in the Chamber - Balancing (#78)
* stop melee from scoring points * switch gun to wingman elite * add wingman elite mod * add playlistvar for wingman_n
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut19
1 files changed, 15 insertions, 4 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut
index bbd669cd..5768dcfa 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut
@@ -22,6 +22,10 @@ void function ChamberInitPlayer( entity player )
UpdateLoadout( player )
}
+int function GetChamberWingmanN(){
+ return GetCurrentPlaylistVarInt( "chamber_wingman_n", 0 )
+}
+
void function ChamberOnPlayerKilled( entity victim, entity attacker, var damageInfo )
{
if ( !victim.IsPlayer() || GetGameState() != eGameState.Playing || attacker == victim)
@@ -29,10 +33,17 @@ void function ChamberOnPlayerKilled( entity victim, entity attacker, var damageI
if ( attacker.IsPlayer() )
{
- attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
- AddTeamScore( attacker.GetTeam(), 1 )
+ if ( (DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.mp_weapon_wingman_n) || (DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.mp_weapon_wingman) )
+ {
+ attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
+ AddTeamScore( attacker.GetTeam(), 1 )
+ }
+
if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.human_execution )
{
+ attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
+ AddTeamScore( attacker.GetTeam(), 1 )
+
string message = victim.GetPlayerName() + " got executed."
foreach ( entity player in GetPlayerArray() )
SendHudMessage( player, message, -1, 0.4, 255, 0, 0, 0, 0, 3, 0.15 )
@@ -75,8 +86,8 @@ void function UpdateLoadout( entity player )
player.TakeWeaponNow( weapon.GetWeaponClassName() )
array<string> mods = ["one_in_the_chamber"]
- player.GiveWeapon( "mp_weapon_wingman", mods)
- player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE )
+ player.GiveWeapon( (GetChamberWingmanN() ? "mp_weapon_wingman_n" : "mp_weapon_wingman"), mods)
+ player.GiveOffhandWeapon( "melee_pilot_kunai", OFFHAND_MELEE )
thread SetAmmo( player )
}