aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hs.gnut
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hs.gnut')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hs.gnut91
1 files changed, 91 insertions, 0 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hs.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hs.gnut
new file mode 100644
index 000000000..8bfbb10e0
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_hs.gnut
@@ -0,0 +1,91 @@
+global function ClGamemodeHideAndSeek_Init
+global function ServerCallback_ShowHideAndSeekCountdown
+global function ServerCallback_AnnounceHideAndSeekRole
+global function ServerCallback_SeekersIncoming
+global function ServerCallback_LastHiderAlive
+
+struct {
+ var countdownRui
+} file
+
+void function ClGamemodeHideAndSeek_Init()
+{
+ ClGameState_RegisterGameStateAsset( $"ui/gamestate_info_lts.rpak" )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.GAMEMODE_1, "music_mp_fd_midwave", HIDEANDSEEK_TEAM_SEEKER )
+ RegisterLevelMusicForTeam( eMusicPieceID.GAMEMODE_1, "music_skyway_01_intro", HIDEANDSEEK_TEAM_HIDER )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.GAMEMODE_2, "music_skyway_04_smartpistolrun", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.GAMEMODE_2, "music_skyway_04_smartpistolrun", TEAM_MILITIA )
+}
+
+void function ServerCallback_ShowHideAndSeekCountdown( float endTime )
+{
+ file.countdownRui = CreateCockpitRui( $"ui/dropship_intro_countdown.rpak", 0 )
+ RuiSetResolutionToScreenSize( file.countdownRui )
+ RuiSetGameTime( file.countdownRui, "gameStartTime", endTime )
+}
+
+void function ServerCallback_AnnounceHideAndSeekRole()
+{
+ if ( GetLocalViewPlayer().GetTeam() == HIDEANDSEEK_TEAM_SEEKER )
+ {
+ AnnouncementData announcement = Announcement_Create( "#HIDEANDSEEK_YOU_ARE_SEEKER" )
+ Announcement_SetSubText( announcement, Localize( "#HIDEANDSEEK_SEEKER_DESC", GetCurrentPlaylistVarFloat( "hideandseek_hiding_time", 60.0 ).tostring() ) )
+ Announcement_SetTitleColor( announcement, <0,0,1> )
+ Announcement_SetPurge( announcement, true )
+ Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc
+ Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK )
+ Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK )
+ AnnouncementFromClass( GetLocalViewPlayer(), announcement )
+ }
+ else
+ {
+ AnnouncementData announcement = Announcement_Create( "#HIDEANDSEEK_YOU_ARE_HIDER" )
+ Announcement_SetSubText( announcement, "#HIDEANDSEEK_HIDER_DESC" )
+ Announcement_SetTitleColor( announcement, <0,0,1> )
+ Announcement_SetPurge( announcement, true )
+ Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc
+ Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK )
+ Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK )
+ AnnouncementFromClass( GetLocalViewPlayer(), announcement )
+ }
+}
+
+void function ServerCallback_SeekersIncoming()
+{
+ AnnouncementData announcement = Announcement_Create( "#HIDEANDSEEK_SEEKERS_INCOMING" )
+ Announcement_SetSubText( announcement, "#HIDEANDSEEK_DONT_GET_FOUND" )
+ Announcement_SetTitleColor( announcement, <1,0,0> )
+ Announcement_SetPurge( announcement, true )
+ Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc
+ Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK )
+ Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK )
+ AnnouncementFromClass( GetLocalViewPlayer(), announcement )
+}
+
+void function ServerCallback_LastHiderAlive()
+{
+ if ( GetLocalViewPlayer().GetTeam() == HIDEANDSEEK_TEAM_SEEKER )
+ {
+ AnnouncementData announcement = Announcement_Create( Localize( "#HIDEANDSEEK_GET_LAST_HIDER", GetPlayerArrayOfTeam_Alive( HIDEANDSEEK_TEAM_HIDER )[ 0 ].GetPlayerName() ) )
+ Announcement_SetTitleColor( announcement, <1,0,0> )
+ Announcement_SetPurge( announcement, true )
+ Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc
+ Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK )
+ Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK )
+ AnnouncementFromClass( GetLocalViewPlayer(), announcement )
+ }
+ else
+ {
+ AnnouncementData announcement = Announcement_Create( "#HIDEANDSEEK_YOU_ARE_LAST_HIDER" )
+ Announcement_SetSubText( announcement, "#HIDEANDSEEK_GOT_STIM" )
+ Announcement_SetTitleColor( announcement, <1,0,0> )
+ Announcement_SetPurge( announcement, true )
+ Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc
+ Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK )
+ Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK )
+ AnnouncementFromClass( GetLocalViewPlayer(), announcement )
+ }
+}
+