aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom
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
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')
-rw-r--r--Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt11
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut19
2 files changed, 26 insertions, 4 deletions
diff --git a/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt
new file mode 100644
index 000000000..ba6f0964c
--- /dev/null
+++ b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt
@@ -0,0 +1,11 @@
+WeaponData
+{
+ Mods
+ {
+ one_in_the_chamber
+ {
+ damage_near_value "9999"
+ damage_far_value "9999"
+ }
+ }
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut
index bbd669cd0..5768dcfaf 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 )
}