Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_PreGameGameModeStateComponent.c
Go to the documentation of this file.
1[ComponentEditorProps(category: "GameScripted/GameMode/Components", description: "Game Mode component responsible for adding a 'pre-game' period to the game mode.")]
5
7class SCR_PreGameGameModeStateComponent : SCR_BaseGameModeStateComponent
8{
9 [Attribute("30", uiwidget: UIWidgets.Slider, "Duration of this state in seconds or 0 for infinite duration. (Requires manual start)", params: "0 864000 1", category: "Game Mode")]
10 protected float m_fDuration;
11
12 [Attribute("1", uiwidget: UIWidgets.CheckBox, "Disables player controls in this state if checked.", category: "Game Mode")]
13 protected bool m_bDisableControls;
14
15 //------------------------------------------------------------------------------------------------
17 override float GetDuration()
18 {
19 return m_fDuration;
20 }
21
22 //------------------------------------------------------------------------------------------------
25 override bool CanAdvanceState(SCR_EGameModeState nextState)
26 {
27 return m_fDuration > 0.0 && m_pGameMode.GetElapsedTime() >= m_fDuration;
28 }
29
30 //------------------------------------------------------------------------------------------------
32 override bool GetAllowControls()
33 {
34 return !m_bDisableControls;
35 }
36
37 //------------------------------------------------------------------------------------------------
40 {
41 return SCR_EGameModeState.PREGAME;
42 }
43}
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_BaseGameModeComponentClass m_pGameMode
The game mode entity this component is attached to.
bool CanAdvanceState(SCR_EGameModeState nextState)
SCR_EGameModeState GetAffiliatedState()
Called on the authority when created to assign state this component belongs to.
SCR_BaseGameModeStateComponentClass SCR_BaseGameModeComponentClass GetAllowControls()
Base component for handling game mode states.
SCR_EGameModeState
SCR_FieldOfViewSettings Attribute