From 7eeac373f44a6fea2cf907c5abf005fd1cfee2f0 Mon Sep 17 00:00:00 2001 From: RoyalBlue1 Date: Sun, 9 Jan 2022 16:02:01 +0100 Subject: Add flag carrier scoring to Live Fire Arena (#88) * Add Flag Scoring to Live Fire Arena Adds a Point to the assault score of the player who carries the Flag at round end. This is the behaviour I observed in youtube videos, but there are not enough for me to determine if this is the correct behaviour --- .../mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut index 974481c1..207af721 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut @@ -23,6 +23,7 @@ void function GamemodeSpeedball_Init() AddCallback_GameStateEnter( eGameState.Prematch, CreateFlagIfNoFlagSpawnpoint ) AddCallback_GameStateEnter( eGameState.Playing, ResetFlag ) + AddCallback_GameStateEnter( eGameState.WinnerDetermined,GamemodeSpeedball_OnWinnerDetermined) AddCallback_OnTouchHealthKit( "item_flag", OnFlagCollected ) AddCallback_OnPlayerKilled( OnPlayerKilled ) SetTimeoutWinnerDecisionFunc( TimeoutCheckFlagHolder ) @@ -147,3 +148,9 @@ int function TimeoutCheckFlagHolder() return file.flagCarrier.GetTeam() } + +void function GamemodeSpeedball_OnWinnerDetermined() +{ + if(IsValid(file.flagCarrier)) + file.flagCarrier.AddToPlayerGameStat( PGS_ASSAULT_SCORE, 1 ) +} \ No newline at end of file -- cgit v1.2.3