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

Env hudhint: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Keyvalues: Remove ALL CAPS)
 
(29 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{base point|env_hudhint}} It is used to control the display of HUD hints, which show the player what key is bound to a particular command.
{{LanguageBar}}
{{CD|CEnvHudHint}}
{{This is a|logical entity|name=env_hudhint|sprite=1}} {{gmod|not}}


{{note|{{css}} The HUD hints are only displayed to the activators of the I/O chain.}}
__NOTOC__
It is used to control the display of HUD hints, which show the player what key is bound to a particular command.


==Keyvalues==
{{note|In {{l4d|4}} and later, the message will only show to the !activator unless it's singleplayer.}}
{{KV|Hint Text (localized)|string|This should be match a HUD hint entry in <code>hl2\resource\[[valve_english.txt]]</code> or its localized equivalent. Example: entering "<code>#Valve_Hint_Zoom</code>" (without the quotation marks) will display the following hint text: "%+zoom% ZOOM VIEW", with %+zoom% being the key currently bound to the zoom function. {{warning|Entering an unlocalized text as a hint will work, though when used in a mod you cannot make it language-specific unless you make localized text for the specified name!}}}}
 
[[File:Hudhint.png|right]]
 
== Flags ==
{{fl|1|All Players {{removed|{{l4d}}}}|Show the message to everyone on the server (otherwise show to !activator only)}}
 
== Keyvalues ==
{{KV Targetname}}
{{KV Targetname}}
{{KV|Hint Text (localized)|intn=message|string|This should be match a HUD hint entry in <code>hl2/resource/[[valve_english.txt]]</code> or its localized equivalent. Example: entering "<code>#Valve_Hint_Zoom</code>" (without the quotation marks) will display the following hint text: "%+zoom% ZOOM VIEW", with %+zoom% being the key currently bound to the zoom function.


==Inputs==
{{warning|Entering raw text will not allow the message to be translated between user languages.}}
{{IO|ShowHudHint|Shows the hint message.}}
{{note|In {{tf2}} and potentially other games, the % character interacts differently with text.  Displaying keybinds found in the resource folder may force any text after the % character to display on a new line.}}}}
{{IO|HideHudHint|Hides the hint message.}}
{{I Targetname}}


==Outputs==
{{O Targetname}}


==See also==
== Inputs ==
* [[env_message]] - A similar entity that displays other predefined messages on the screen.
{{I|ShowHudHint|Shows the hint message.}}
{{I|HideHudHint|Hides the hint message.}}


[[Category:GUI Entities]]
==Dedicated Console Variables==
{{varcom|start}}
{{varcom|cl_hudhint_sound|1|[[Bool]]|Enable\disable the sound when HUD hint displays.
{{confirm|Works only in {{bms|4}} ?}}
}}
{{varcom|end}}


==Tutorials about Env_HudHint (Russian)==
== External links ==
Lessons created by [https://vk.com/project_source Project-S]
'''Map example .VMF, .BSP and with scripts fix'''
* http://gtamike.tsgk.com/gtamike_TSGK/test_area_hudhint.rar


*[https://www.youtube.com/watch?v=NHYZyAKLNsk Env_HudHint + Game_Text (на Русском)]
== See also ==
* {{ent|env_message}} - A similar entity that displays other predefined messages on the screen.
* {{ent|env_instructor_hint}} - Another similar entity used in {{l4d2|4}} and newer games.

Latest revision as of 05:23, 29 August 2025

English (en)中文 (zh)Translate (Translate)
C++ Class hierarchy
CEnvHudHint
CPointEntity
CBaseEntity
Env hudhint.png

env_hudhint is a logical entity available in all Source Source games. (not in Garry's Mod)


It is used to control the display of HUD hints, which show the player what key is bound to a particular command.

Note.pngNote:In Left 4 Dead Left 4 Dead and later, the message will only show to the !activator unless it's singleplayer.
Hudhint.png

Flags

All Players (removed since Left 4 Dead) : [1]
Show the message to everyone on the server (otherwise show to !activator only)

Keyvalues

Name (targetname) <string>[ Edit ]
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

Hint Text (localized) (message) <string>
This should be match a HUD hint entry in hl2/resource/valve_english.txt or its localized equivalent. Example: entering "#Valve_Hint_Zoom" (without the quotation marks) will display the following hint text: "%+zoom% ZOOM VIEW", with %+zoom% being the key currently bound to the zoom function.
Warning.pngWarning:Entering raw text will not allow the message to be translated between user languages.
Note.pngNote:In Team Fortress 2 and potentially other games, the % character interacts differently with text. Displaying keybinds found in the resource folder may force any text after the % character to display on a new line.


Inputs

ShowHudHint
Shows the hint message.
HideHudHint
Hides the hint message.

Dedicated Console Variables

Cvar/Command Parameters or default value Descriptor Effect
cl_hudhint_sound 1 Bool Enable\disable the sound when HUD hint displays.
Confirm:Works only in Black Mesa Black Mesa ?

External links

Map example .VMF, .BSP and with scripts fix

See also