logic_skill
Jump to navigation
Jump to search

Tip: Use it whenever doing difficulty dependent ingame behavior.

logic_skill is a logical entity available in
Black Mesa and
Mapbase. An entity that can fire specific outputs based on the server's currently set difficulty (skill console variable).
Keyvalues
- Name (targetname) <string>
-
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
-
Listen for skill changes? (ListenForSkillChange) <boolean> (only in
)
- 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
) - Tests current difficulty value, and fires OnSkill1, OnSkill2, or OnSkill3 output, depending on the current difficulty.
- Test <void> (only in
) - Test the skill level and fire an input based on the returning value.
- StartListening <void> (only in
) - Starts listening for difficulty level changes.
- StopListening <void> (only in
) - Stops listening for difficulty level changes.
Outputs
- OnSkill1 <void> (only in
) - Fired if test of current difficulty value results in Easy/Normal (
skill 1). - OnSkill2 <void> (only in
) - Fired if test of current difficulty value results in Normal/Black Mesa (
skill 2). - OnSkill3 <void> (only in
) - Fired if test of current difficulty value results in Hard (
skill 3). - OnSkillChanged <void> (only in
) - Fired when the difficulty is changed.
- OnEasy <void> (only in
) - Fired if test of current difficulty value results in Easy (
skill 1). - OnNormal <void> (only in
) - Fired if test of current difficulty value results in Normal (
skill 2). - OnHard <void> (only in
) - Fired if test of current difficulty value results in Hard (
skill 3).
See also
- logic_skill_puzzle - similar entity for puzzle difficulty.