aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts
diff options
context:
space:
mode:
authorRoyalBlue1 <malte.hoermeyer@web.de>2022-01-09 16:02:01 +0100
committerGitHub <noreply@github.com>2022-01-09 12:02:01 -0300
commit7eeac373f44a6fea2cf907c5abf005fd1cfee2f0 (patch)
treed1c81f486e79c2963f48eac88ef8ca71f58a58c3 /Northstar.CustomServers/mod/scripts
parent974134d142e54f650cfa3c8e46e0d58542a39fb1 (diff)
downloadNorthstarMods-7eeac373f44a6fea2cf907c5abf005fd1cfee2f0.tar.gz
NorthstarMods-7eeac373f44a6fea2cf907c5abf005fd1cfee2f0.zip
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
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut7
1 files changed, 7 insertions, 0 deletions
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