logic_skill

From Valve Developer Community
Jump to navigation Jump to search
Logic skill.png

logic_skill is a logical entity available in Black Mesa Black Mesa and Mapbase Mapbase. An entity that can fire specific outputs based on the server's currently set difficulty (skill console variable).

Tip.pngTip: Use it whenever doing difficulty dependent ingame behavior.

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
Listen for skill changes? (ListenForSkillChange) <boolean> (only in Mapbase)
If enabled, this entity will fire the OnSkillChanged output every time the difficulty is changed. This can also be toggled during the game with inputs.

Inputs

GetSkill <void> (only in Black Mesa)
Tests current difficulty value, and fires OnSkill1, OnSkill2, or OnSkill3 output, depending on the current difficulty.
Test <void> (only in Mapbase)
Test the skill level and fire an input based on the returning value.
StartListening <void> (only in Mapbase)
Starts listening for difficulty level changes.
StopListening <void> (only in Mapbase)
Stops listening for difficulty level changes.

Outputs

OnSkill1 <void> (only in Black Mesa)
Fired if test of current difficulty value results in Easy/Normal (skill 1).
OnSkill2 <void> (only in Black Mesa)
Fired if test of current difficulty value results in Normal/Black Mesa (skill 2).
OnSkill3 <void> (only in Black Mesa)
Fired if test of current difficulty value results in Hard (skill 3).
OnSkillChanged <void> (only in Mapbase)
Fired when the difficulty is changed.
OnEasy <void> (only in Mapbase)
Fired if test of current difficulty value results in Easy (skill 1).
OnNormal <void> (only in Mapbase)
Fired if test of current difficulty value results in Normal (skill 2).
OnHard <void> (only in Mapbase)
Fired if test of current difficulty value results in Hard (skill 3).

See also