I'm a doctor, not a mechanic
User:Crusha/UltimateMappingTools/PlayerCountTrigger
by Crusha K. Rool
Contents
- Package:
- UltimateMappingTools
Triggers an Event when at least so many players are in the game as specified here. Untriggers it when the PlayerCount shrinks below the specified amount.
Hint: Use a LogicalNOT to make this thing work in the other direction, so that it triggers if less than x players are in the game.
Properties
Property group 'PlayerCountTrigger'
bCountHumansOnly
Type: bool
Bots are not considered in the PlayerCount.
PlayerCount
Type: byte
Triggers the Event when at least this much players are in the game.
Default value: 16
Internal variables
bHasTriggeredAlready
Type: bool
So that we don't trigger again when another player joins although we are above PlayerCount already.
Default values
Property | Value |
---|---|
bCollideActors | False |
Functions
Events
SetInitialState
Overrides: Actor.SetInitialState
Go to the appropriate state, either for humans only or also for bots. With states can we save more performance than with boolean checks.
Other instance functions
Reset
Overrides: Actor.Reset
The Event will be untriggered and is allowed to trigger again in the next Tick.
States
HumansAndBots
Counts bots too.
HumansAndBots.Tick
Overrides: Actor.Tick (global)
Checking Level.Game.NumPlayers + Level.Game.NumBots every Tick.
HumansOnly
Count only humans, bots can not be taken as serious players.
HumansOnly.Tick
Overrides: Actor.Tick (global)
Checking Level.Game.NumPlayers every Tick.