Info gamemode: Difference between revisions
Jump to navigation
Jump to search


Idea:Vscripts Input[InputName] hook can be used on these.
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
No edit summary |
||
Line 1: | Line 1: | ||
{{LanguageBar}} | |||
{{CD|CInfoGameMode}} | |||
{{this is a|point entity|sprite=1|name=info_gamemode|series=Left 4 Dead}} When a map is loaded, this entity can fire outputs depending on the current game mode. This allows the all game modes to be available in a single map instead of having separate maps for each game mode. {{clr}} | {{this is a|point entity|sprite=1|name=info_gamemode|series=Left 4 Dead}} When a map is loaded, this entity can fire outputs depending on the current game mode. This allows the all game modes to be available in a single map instead of having separate maps for each game mode. {{clr}} | ||
Line 8: | Line 9: | ||
{{IO|OnScavenge|Fired when the map spawns in specified mode. | {{IO|OnScavenge|Fired when the map spawns in specified mode. | ||
:{{note|OnCoop fires in realism}} | :{{note|OnCoop fires in realism}} | ||
:{{bug|Killing the info_gamemode itself in one of these outputs with 0 delay crashes the game}}|in=L4D2}} | :{{bug|Killing the info_gamemode itself in one of these outputs with 0 delay crashes the game|tested=l4d2}}|in=L4D2}} | ||
{{IO|OnCoopPostIO|since=L4D2}} | {{IO|OnCoopPostIO|since=L4D2}} | ||
Line 16: | Line 17: | ||
:{{note|This doesn't mean item populating causes the output to be fired, mentioning item being populated just as a frame of reference}} | :{{note|This doesn't mean item populating causes the output to be fired, mentioning item being populated just as a frame of reference}} | ||
:{{tip|Useful when wanting to spawn templated weapon_* entities and not have it affected by info_map_parameters densities {{confirm}}}} | :{{tip|Useful when wanting to spawn templated weapon_* entities and not have it affected by info_map_parameters densities {{confirm}}}} | ||
:{{ | :{{Confusion|Description in FGD is not correct. This output does fire later than On<Mode> outputs but it doesn't wait until IO generated by it finishes. Doesn't even wait for the delays specified in On<Mode> outputs to expire.}} | ||
{{bug|On<mode> and On<mode>PostIO outputs simply check base gamemode to determine whether to fire. So if a [[mode file]] specifies something else than coop, realism, versus, scavenge, survival as its base none of them will fire}} <!-- not sure if this warning should be on this page since it feels quite useless to whoever works with info_gamemode --> | {{bug!|On<mode> and On<mode>PostIO outputs simply check base gamemode to determine whether to fire. So if a [[mode file]] specifies something else than coop, realism, versus, scavenge, survival as its base none of them will fire}} <!-- not sure if this warning should be on this page since it feels quite useless to whoever works with info_gamemode --> | ||
{{IO|OnScavengeMatchStart|Fired on the first map load of a scavenge match. Doesn't fire on round restarts. {{note|Fires shortly after OnGameplayStart of info_director is fired}}|since=L4D2}} | {{IO|OnScavengeMatchStart|Fired on the first map load of a scavenge match. Doesn't fire on round restarts. {{note|Fires shortly after OnGameplayStart of info_director is fired}}|since=L4D2}} | ||
Line 27: | Line 28: | ||
{{IO|FireScavengeMatchStart|Fired internally and causes OnScavengeMapStart output to fire.|nofgd=1}} | {{IO|FireScavengeMatchStart|Fired internally and causes OnScavengeMapStart output to fire.|nofgd=1}} | ||
{{ | {{Idea|Vscripts [[Left_4_Dead_2/Script_Functions#Hooks|Input{{!(}}InputName{{)!}}]] hook can be used on these. {{todo| What happens when preventing these to fire by returning false ?}} }} | ||
== See also == | == See also == |
Revision as of 14:43, 5 September 2024


![]() |
---|
CInfoGameMode |

info_gamemode
is a point entity available in Left 4 Dead series. When a map is loaded, this entity can fire outputs depending on the current game mode. This allows the all game modes to be available in a single map instead of having separate maps for each game mode.
Outputs
- OnCoop
- OnVersus
- OnSurvival
- OnScavenge
- Fired when the map spawns in specified mode.
Note:OnCoop fires in realism
Bug:Killing the info_gamemode itself in one of these outputs with 0 delay crashes the game (tested in: l4d2)
- OnCoopPostIO (in all games since
)
- OnVersusPostIO (in all games since
)
- OnSurvivalPostIO (in all games since
)
- OnScavengePostIO (in all games since
)
- Fired shortly after all scavenge items have been populated
Note:This doesn't mean item populating causes the output to be fired, mentioning item being populated just as a frame of reference
Tip:Useful when wanting to spawn templated weapon_* entities and not have it affected by info_map_parameters densities [confirm]
Risk of Confusion:Description in FGD is not correct. This output does fire later than On<Mode> outputs but it doesn't wait until IO generated by it finishes. Doesn't even wait for the delays specified in On<Mode> outputs to expire.
- OnScavengeMatchStart (in all games since
)
- Fired on the first map load of a scavenge match. Doesn't fire on round restarts.
Note:Fires shortly after OnGameplayStart of info_director is fired
- OnNavAnalyze (in all games since
)
- Fired when the map is loaded with -navanalyze on the command line.
Inputs
- PostSpawnActivate !FGD
- Fired internally and causes On<Mode> output to fire.
- PreRoundActivate !FGD
- Fired internally and causes On<Mode>PostIO output to fire.
- FireScavengeMatchStart !FGD
- Fired internally and causes OnScavengeMapStart output to fire.

Todo: What happens when preventing these to fire by returning false ?