Trigger finale: Difference between revisions
Jump to navigation
Jump to search
AltNames: This entity is also tied to
Risk of Confusion:Despite the name starting with word
Note:This entity is not required for survival gamemodes. Anything that fires the
Warning:Do NOT spawn a map's only trigger_finale with a point_template, make it
If using a point_template is still desired, make sure to
m (Classifying as model entity) |
(Improved the point_template warning) |
||
| Line 2: | Line 2: | ||
{{CD|CFinaleTrigger|CBreakableProp}} | {{CD|CFinaleTrigger|CBreakableProp}} | ||
{{this is a|model entity|name=trigger_finale|series=Left 4 Dead}} It acts as trigger for the finale of a campaign and is capable of firing outputs for different stages of the finale.<br> | {{this is a|model entity|name=trigger_finale|series=Left 4 Dead}} It acts as trigger for the finale of a campaign and is capable of firing outputs for different stages of the finale.<br> | ||
In most cases, if this entity is represented as a model in the world (like the ham-radio) it would start disabled, because first the players would interact with a {{ent|func_button}} tied to a {{ent|prop_dynamic}} to play | In most cases, if this entity is represented as a model in the world (like the ham-radio), it would start disabled, because first the players would interact with a {{ent|func_button}} tied to a {{ent|prop_dynamic}} to play a voice line and then enable the actual trigger_finale.<br> | ||
If trigger_finale is not above the finale arena's nav mesh, the end of the escape route will be determined by the center of the all the nav areas marked with <code>FINALE</code>.<br> | If trigger_finale is not above the finale arena's nav mesh, the end of the escape route will be determined by the center of the all the nav areas marked with <code>FINALE</code>.<br> | ||
{{altnames|name1=finale_trigger}} | {{altnames|name1=finale_trigger}} | ||
{{ModernConfusion|Despite the name starting with word <code>trigger_</code> it's not a trigger brush entity but a button using a studio model}} | {{ModernConfusion|Despite the name starting with word <code>trigger_</code> it's not a trigger brush entity but a button using a studio model}} | ||
{{note|This entity is not required for survival gamemodes. Anything that fires the <code>ForcePanicEvent</code> on the {{ent|info_director}} will start survival finales.}} | {{note|This entity is not required for survival gamemodes. Anything that fires the <code>ForcePanicEvent</code> on the {{ent|info_director}} will start survival finales.}} | ||
{{warning|Do NOT spawn | {{warning|1=Do NOT spawn a map's only {{ent|trigger_finale}} with a {{ent|point_template}}, make it {{code|StartDisabled}} instead! Late spawning via <kbd>point_template</kbd> results in poor VScript compatibility, especially for finale type detection by mutations. Furthermore, <kbd>trigger_finale</kbd> spawning after a button press would make the rescue teleport and campaign stats consolidation fail if said button was skipped for whatever reason. See [https://github.com/Tsuey/L4D2-Community-Update/pull/270 this issue] and, for example, these Bridge finales: [https://youtu.be/69QYiJAfBHo?t=1503] [https://youtu.be/8kwQOxQwDdU?t=3746].<br> | ||
If using a <kbd>point_template</kbd> is still desired, make sure to {{code|ForceSpawn}} it with 0 delay through the {{code|OnCoop}} {{ent|info_gamemode}} output as it's the only output{{confirm}} that fires before the {{code|ScriptMode_Init}}'s second run.}} | |||
== Keyvalues == | == Keyvalues == | ||
{{KV Targetname}} | {{KV Targetname}} | ||
Revision as of 17:51, 26 May 2025
| CFinaleTrigger |
trigger_finale is a model entity available in ![]()
Left 4 Dead series. It acts as trigger for the finale of a campaign and is capable of firing outputs for different stages of the finale.
In most cases, if this entity is represented as a model in the world (like the ham-radio), it would start disabled, because first the players would interact with a func_button tied to a prop_dynamic to play a voice line and then enable the actual trigger_finale.
If trigger_finale is not above the finale arena's nav mesh, the end of the escape route will be determined by the center of the all the nav areas marked with FINALE.
finale_trigger. trigger_ it's not a trigger brush entity but a button using a studio modelForcePanicEvent on the info_director will start survival finales.StartDisabled instead! Late spawning via point_template results in poor VScript compatibility, especially for finale type detection by mutations. Furthermore, trigger_finale spawning after a button press would make the rescue teleport and campaign stats consolidation fail if said button was skipped for whatever reason. See this issue and, for example, these Bridge finales: [1] [2].If using a point_template is still desired, make sure to
ForceSpawn it with 0 delay through the OnCoop info_gamemode output as it's the only output[confirm] that fires before the ScriptMode_Init's second run.Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentnameortarget).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- World model (model) <model path>
- Disable Shadows (disableshadows) <boolean>
- Used to disable dynamic shadows on this entity.
- First Use Delay (FirstUseDelay) <float>
- For two-part finale starts, delays this many seconds before allowing another +use.
- Use Delay (UseDelay) <float>
- Starts the finale this many seconds after a +use.
- Finale Type (type) <choices> (in all games since
) - Specifies which style of finale to trigger:
- 0 : Standard
- 1 : Gauntlet
- 2 : Custom
- 3 : Broken. Starts the finale but stucks on PANIC stage and never spawns any infected at all. !FGD
- 4 : Scavenge
- Script File (ScriptFile) <string> (in all games since
) - Takes precedence over the standard [mapname]_finale.nut script by running in the
LocalScriptscope.
- Versus Travel (VersusTravelCompletion) <float> (in all games since
) - How much of the versus score is attained through travel to the finale (not valid in gauntlet finale).
Warning:Doesn't work with standard finale type.
- Is Sacrifice Finale (IsSacrificeFinale) <boolean> (in all games since
) - If true, one survivor has to be available to perform some action outside the escape vehicle.
- Start Disabled (StartDisabled) <boolean>
- Stay dormant until activated (with the
Enableinput).
Inputs
- FinaleEscapeFinished
- Gives the survivors a victory, starts playing the credits music and consolidates the campaign stats.
Important:Must be fired before firing RollStatsCrawl into env_outtro_statsfor the stats to work properly
- FinaleEscapeForceSurvivorPositions
- Teleports the survivors to a set of info_survivor_position entities. Used to make the survivors stand still on the escape vehicle or hide them. Required for the credits/stats to correctly count who escaped and who died in the finale.
- FinaleEscapeVehicleReadyForSurvivors
- Unlocks the escape vehicle navigation mesh areas, and makes survivors speak out that the vehicle has arrived.
- ForceFinaleStart
- Start the finale now. Only works when all survivors have entered the finale area marked in the navigation mesh.
Tip:If you want to allow a finale to start with incapped players outside the finale area, use the Useinput.
- EnableEscapeSequence (only in
) - Allow the escape sequence to happen at the proper phase of the finale.
- DisableEscapeSequence (only in
) - Block the escape sequence from happening (until re-enabled). Infected will still spawn.
- GauntletStopPanic (in all games since
) - Move the gauntlet finale state out of continuous panic mode. Advances to the tank stage the first time it is called, and the escape sequence the second time.
- AdvanceFinaleState (in all games since
) - Increments the finale stage.
- SacrificeEscapeFailed (in all games since
) - Indicates the survivors failed the escape requirements.
- SacrificeEscapeSucceeded (in all games since
) - Indicates the survivors met the escape requirements.
- SacrificePlayerBeginsRun (in all games since
) - A player has committed to the sacrifice run. (!activator is the player)
- ForceTankSpawn (in all games since
) - Possibly only for Gauntlet style finale in-play.
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
Outputs
- FinaleEscapeStarted
- Fired when the survivors should start their escape.
- FinaleWon
- Fired when the survivors win the finale.
- FinaleLost
- Fired when the survivors lose the finale.
- FirstUseStart
- Fired when a player uses the trigger the first time.
- UseStart
- Fired when a player uses the trigger to start the finale.
- FinaleStart
- Fired when the finale starts.
- FinalePause
- Fired during the pause between each finale wave.
- EscapeVehicleLeaving
- Fired when the escape vehicle starts to leave.