-
Notifications
You must be signed in to change notification settings - Fork 7
Lua gamemode script
This is where most of the magic happens. This class defines your game mode.
Methods of this class are actually "overloading" the base gamemode class. This means
that the game will call the methods you define here on specified events, e.g.:
PlayerInsertionPointChanged
will be called when a player selects an insertion
point on the ops board.
Method called right after the mission is loaded.
Method called just before player gets control.
Parameters:
-
RoundStage string named of the set round stage
- "WaitingForReady"
- "ReadyCountdown"
- "PreRoundWait"
- "InProgress"
- "PostRoundWait"
Triggered when a round stage is set. Round stage can be anything set by the user using the gamemode.SetRoundStage(stage) function. Howver there are some predefined round stages.
Parameters:
-
RoundStage string Name of the elapsed round stage
- "WaitingForReady"
- "ReadyCountdown"
- "PreRoundWait"
- "InProgress"
- "PostRoundWait"
Triggered when a round stage time elapse. Round stage can be anything set by the user using the gamemode.SetRoundStage(stage) function. However there are some predefined round stages.
Parameters:
- Character Character Character that died.
- CharacterController Controller Controller of the character that died.
- KillerController Controller Controller of the character that killed the character.
Triggered whenever any character dies (player or bot).
Parameters:
- GameTrigger Actor
- Player Player
Triggered whenever any actor ovelaps a trigger. Note: Extraction points act as triggers as well.
Parameters:
- PlayerState PlayerState
- InsertionPoint InsertionPoint
Method called when a player changes the selected insertion point.
Parameters:
- PlayerState PlayerState
-
ReadyStatus string some possible values
- "WaitingToReadyUp"
- "DeclaredReady"
Method called when a player changes their ready status. If mission provides insertion points this is called at more or less the same time as PlayerInsertionPointChanged.
Parameters:
- PlayerState PlayerState
Returns boolean PlayerCanEnterPlayArea whether or not should we allow users to enter play area.
Called by the game to check if the player should be allowed to enter play area.
Parameters:
- PlayerState PlayerState
Called when any player enters the play area.
Parameters:
- PlayerState PlayerState
-
Request string some possible values
- "join"
Parameters:
- PlayerState PlayerState
Returns Actor SpawnPoint the spawn point we want the user to spawn in.
Called when a player tries to enter play area in order to get a spawn point for the player. Has to return a spawn point in which the user will be spawned.
Parameters:
- Exiting any
Triggered whenever a player leaves the game.
Returns boolean ShouldCheckForTeamKills should we check for team kills.
Whether or not we should check for team kills at this point.