Player loadsaved (GoldSrc): Difference between revisions
Jump to navigation
Jump to search
Dr. Orange (talk | contribs) m (Changed template) |
(Mapper Control Over when player reloads) |
||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
{{Hl1 series point|player_loadsaved}} This entity will reload the latest saved game when triggered. Useful for gameover screens if an important NPC dies, or a crucial object is lost. Can be used together with [[env_message_(GoldSource_Engine)|env_message]] to display an appropriate text message. | {{Hl1 series point|player_loadsaved}} As well in {{Hl2}},{{ep1}},{{ep2}} and after (''2004-current''). This entity will reload the latest saved game when triggered. Useful for gameover screens if an important NPC dies, or a crucial object is lost. Can be used together with [[env_message_(GoldSource_Engine)|env_message]] to display an appropriate text message. | ||
[[Category:Half-Life Entities]] | [[Category:Half-Life Entities]] | ||
[[Category:Level Design]] | [[Category:Level Design]] | ||
==Inputs== | |||
{{KV|Reload| | Forces Reload of level to the latest save.}}{{note|It will only reload saves from the game world. Does not reload saves from quick save (F6/F7)}} | |||
{{KV|Kill| | Removes this entity from the world.}} | |||
{{KV|KillHierarchy| | Removes this entity and its children from the world.}} {{note|Entities already remove orphaned children upon being removed, but this input removes all children on the same frame, being marginally faster than Kill.}} | |||
{{KV|AddOutput|string| [[AddOutput]] Adds a keyvalue/output to this entity. It can be potentially very dangerous, use with care. | |||
KV Format: <key> <value> | |||
I/O Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>}} | |||
{{KV|Kill| | Removes this entity from the world.}} | |||
{{KV|RunScriptFile|script| Execute a [[VScript]] file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.}} | |||
{{KV|RunScriptCode|string|Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.|since=l4d2}}{{Bug|In '''Left 4 Dead 2''', the code is executed in the script scope of the entity that fires the output, not the one receiving the input.}}{{Warning|Never try to pass string parameters to a script function with this input. It will corrupt the [[VMF]] structure because of the nested quotation marks, which then must be removed manually with a text editor.}} | |||
{{KV|FireUser1 to FireUser4| | Fire the OnUser outputs; see [[User Inputs and Outputs]].}} | |||
==Keyvalues== | |||
{{KV Targetname}} | |||
{{KV|Fade Duration(seconds)|integer| The amount in seconds it will take to fade out.}} | |||
{{KV|Hold Fade (seconds)|integer| The amount in seconds it will take to hold fade.}} | |||
{{KV|Fade Alpha (renderamt)|integer|Alpha of the fade, where 0 {{=}} fully transparent and 255 {{=}} fully opaque.}} | |||
{{KV|Fade Color (R G B) (rendercolor)|color255|Fade color.}} | |||
{{KV|Reload Delay (seconds)|integer| On Trigger, the amount of time in seconds it will take to reload a save. When set, it will take over Game/Player and reload when prompted.}} | |||
==Outputs== | |||
{{O BaseEntity|l4d=1}} | |||
[[Category:GUI Entities]] |
Revision as of 11:00, 21 July 2021
Template:Hl1 series point As well in ,
,
and after (2004-current). This entity will reload the latest saved game when triggered. Useful for gameover screens if an important NPC dies, or a crucial object is lost. Can be used together with env_message to display an appropriate text message.
Inputs
- Reload ([todo internal name (i)])
- Forces Reload of level to the latest save.
Note:It will only reload saves from the game world. Does not reload saves from quick save (F6/F7)
- Kill ([todo internal name (i)])
- Removes this entity from the world.
- KillHierarchy ([todo internal name (i)])
- Removes this entity and its children from the world.
Note:Entities already remove orphaned children upon being removed, but this input removes all children on the same frame, being marginally faster than Kill.
- AddOutput ([todo internal name (i)]) <string>
- AddOutput Adds a keyvalue/output to this entity. It can be potentially very dangerous, use with care.
KV Format: <key> <value>
I/O Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
- Kill ([todo internal name (i)])
- Removes this entity from the world.
- RunScriptFile ([todo internal name (i)]) <script>
- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
- RunScriptCode ([todo internal name (i)]) <string> (in all games since
)
- Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug:In Left 4 Dead 2, the code is executed in the script scope of the entity that fires the output, not the one receiving the input. [todo tested in ?]
Warning:Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
- FireUser1 to FireUser4 ([todo internal name (i)])
- Fire the OnUser outputs; see User Inputs and Outputs.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Fade Duration(seconds) ([todo internal name (i)]) <integer>
- The amount in seconds it will take to fade out.
- Hold Fade (seconds) ([todo internal name (i)]) <integer>
- The amount in seconds it will take to hold fade.
- Fade Alpha (renderamt) ([todo internal name (i)]) <integer>
- Alpha of the fade, where 0 = fully transparent and 255 = fully opaque.
- Reload Delay (seconds) ([todo internal name (i)]) <integer>
- On Trigger, the amount of time in seconds it will take to reload a save. When set, it will take over Game/Player and reload when prompted.