logic_progress
Jump to navigation
Jump to search

logic_progress is a logical entity available in
No More Room in Hell.
Entity Description
The logic_progress is a logical entity which displays a progress bar on the HUD for clients, stores progress, and fires an output on completion.
KeyValues
- Name (targetname) <string>
- The name that other entities refer to this entity by.
- Entity Scripts (vscripts) <string>
- Name(s) of script files that are executed after all entities have spawned.
- Script think function (thinkfunction) <string>
- Name of a function in this entity's script scope which will be called automatically.
- Progress Type (static) <choices>
- Dynamic is a timer-based counter (i.e. trigger_progress_use). Static remains still, and requires manual use of SetProgress input.
- Broadcast to All Players (broadcast) <choices>
- Display the progress bar to all players, and not only the activator?
- Invert Progress (invert) <choices>
- Should the progress decrease, and fire output when depleted? Note: Milestones remain unchanged, e.g. 0.75 would be fired when 0.25 is hit.
- Progress Length (length) <integer>
- Length to completion in seconds when the progress activates. Only works in Dynamic mode.
Flags
- Remove on Complete : [4]
- Kills this entity when it's completed.
- Save Progress : [8]
- Progress made is persistent, instead of resetting on cancelling interaction.
Inputs
- Kill
- Kills the entity.
- SetProgress
- Sets current progress, with parameter override of ratio (0.0 - 1.0). In dynamic mode, the timer will be set accordingly.
- ToggleProgress
- Toggles progress on/off.
- StartProgress
- Starts progress, with the activator being the user of this entity.
- StopProgress
- Stops progress for all users.
- HideProgress
- Hides progress on HUD while it's still ongoing.
- AddMilestone
- Adds a milestone, with parameter override of progress ratio (0.0 - 1.0). Once hit, output OnMilestone will be fired. You can have multiple milestones.
- SetColor
- Sets a custom color for HUD progress bar.
Outputs
- OnComplete
- Fired when the progress is completed.
- OnMilestone
- Fired when a milestone is hit.
- OnProgress
- Fired when progress is made, with parameter of ratio (0.0 - 1.0).
- OnUser1 to OnUser4
- Fired in response to the FireUser inputs.