This article's documentation is for anything that uses the Source engine. Click here for more information.

logic_autosave

From Valve Developer Community
Jump to navigation Jump to search

English (en)Translate (Translate)
Class hierarchy
CLogicAutosave
CLogicalEntity
CServerOnlyEntity
CBaseEntity
logicentities.cpp
Logic autosave.png

logic_autosave is a point entity available in all Source Source games. It is used to force an autosave. It is usually triggered before large firefights or dangerous areas where the player might die.

Note.pngNote:Arguably pointless for multiplayer.

Keyvalues

Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Force New Level Unit (NewLevelUnit) <boolean>
If set, the save will discard any savedata from previous levels, for the purpose of keeping savegame filesizes down. Can only be safely used if there is no way for the player to return to previous levels.
Minimum Hit Points (MinimumHitPoints) <integer>
Don't save dangerous when player has less than this many hitpoints.
Minimum Hit Points to Commit (MinHitPointsToCommit) <integer>
Minimum hitpoints required to commit to save. The save will be made if you have at least Minimum Hit Points, but when the autosave timer expires, the autosave is only kept if you have at least Min Hitpoints to Commit.

Inputs

Save
Force an autosave.
SaveDangerous <float>
Force an autosave as autosavedangerous.sav. If the player is alive after the passed number of seconds it replaces the standard auto save.
SetMinHitpointsThreshold <integer>
Set MinimumHitPoints to this.

See also