Env instructor hint: Difference between revisions
Jump to navigation
Jump to search
In code, it is represented by the
Note:This entity is not limited to the icons listed above, refer to
Note:If an info_target entity is used, the spawnflag to always transmit to the client must be checked.
Bug:In
, hints triggered by this input are only visible to the !activator. [todo tested in ?]
(Cleared up wording) |
(updates) |
||
Line 1: | Line 1: | ||
{{lang|Env instructor hint}} | |||
[[File:env_instructor_hint.gif|left|link=]] | [[File:env_instructor_hint.gif|left|link=]] | ||
[[File:Instructorhint.png|right|thumb|Example from Portal 2.]] | |||
[[File:Hint_017_show_key_bindings.jpg|thumb|right|This example sets '''Bound Command''' to "jump" (without quotations) with '''Caption''' set to "Bet you can't jump over me!" (without quotations).]] | |||
{{base point|env_instructor_hint|since=Left 4 Dead 2}} It it used to instruct the player to do some things, such as not shoot teammates. | |||
{{ | {{code class|CEnvInstructorHint|env_instructor_hint.cpp}} | ||
==Icons== | |||
{| class="standard-table" | |||
== Icons == | |||
{| class="standard-table | |||
|- | |- | ||
!Icon Name | !Icon Name | ||
!Icon | !Icon | ||
!Icon Name | !Icon Name | ||
!Icon | !Icon | ||
|- | |- | ||
| icon_interact | |icon_tip | ||
| [[ | |[[File:Hint_001_icon_tip.jpg]] | ||
|icon_interact | |||
|[[File:Hint_009_icon_interact.jpg]] | |||
|- | |- | ||
| icon_button | |icon_info | ||
| [[ | |[[File:Hint_002_icon_info.jpg]] | ||
|icon_button | |||
|[[File:Hint_010_icon_button.jpg]] | |||
|- | |- | ||
| icon_door | |icon_shield | ||
| [[ | |[[File:Hint_003_icon_shield.jpg]] | ||
|icon_door | |||
|[[File:Hint_011_icon_door.jpg]] | |||
|- | |- | ||
| icon_arrow_plain | |icon_alert | ||
| [[ | |[[File:Hint_004_icon_alert.jpg]] | ||
|icon_arrow_plain | |||
|[[File:Hint_012_icon_arrow_plain.jpg]] | |||
|- | |- | ||
| icon_arrow_plain_white_dn | |icon_alert_red | ||
| [[ | |[[File:Hint_005_icon_alert_red.jpg]] | ||
|icon_arrow_plain_white_dn | |||
|[[File:Hint_013_icon_arrow_plain_white_dn.jpg]] | |||
|- | |- | ||
| icon_arrow_plain_white_up | |icon_tip (again) | ||
| [[ | |[[File:Hint_006_icon_tip_(again).jpg]] | ||
|icon_arrow_plain_white_up | |||
|[[File:Hint_014_icon_arrow_plain_white_up.jpg]] | |||
|- | |- | ||
| | |icon_skull | ||
| [[ | |[[File:Hint_007_icon_skull.jpg]] | ||
| | |icon_arrow_up | ||
|[[File:Hint_015_icon_arrow_up.jpg]] | |||
| [[ | |||
|- | |- | ||
|icon_no | |||
|[[File:Hint_008_icon_no.jpg]] | |||
|icon_arrow_right | |||
|[[File:Hint_016_icon_arrow_right.jpg]] | |||
|} | |} | ||
{{ | {{note|This entity is not limited to the icons listed above, refer to <code>scripts/mod_textures.txt</code> located in the main pak01_dir.vpk for more icon options.}} | ||
{{ | ==Keyvalues== | ||
{{KV|Target Entity (hint_target)|target_destination|The entity to show this hint on top of. The entity used must be one that is replicated on the client, or the hint will never show up. The {{ent|info_target_instructor_hint}} entity is designed for this purpose, allowing the hint to be placed in empty space or parented to a specific location on another entity. | |||
{{note|If an {{ent|info_target}} entity is used, the spawnflag to always transmit to the client must be checked.}}}} | |||
{{KV|Positioning (hint_static)|choices|Either show at the position of the '''Target Entity''', or show the hint directly on the [[HUD]] at a fixed position. | |||
:*0: Follow the '''Target Entity'''. | |||
:*1: Show on the HUD.}} | |||
{{KV|Allow invisible target (hint_allow_nodraw_target)|choices|Do we allow the hint to follow entities with nodraw set? {{confirm|{{ent|EF_NODRAW}}?}} | |||
:*0: End immediately on nodraw | |||
:*1: Yes}} | |||
{{KV|Caption (hint_caption)|string|The text of your hint. 100 character limit.}} | |||
{{KV|Caption Color (hint_color)|color255|The color of the caption text.}} | |||
{{KV|Activator Caption (hint_activator_caption)|color255|since=AS|The color of the caption text, as seen by the {{ent|!activator}}.}} | |||
{{KV|Force caption (hint_forcecaption)|choices|Do we show the caption text even if the hint is occluded by (hidden behind) a wall? | |||
:*0: No | |||
:*1: Show when occluded}} | |||
{{KV|Onscreen Icon (hint_icon_onscreen)|choices|The icon to use when the hint is within the player's view.}} | |||
{{KV|Offscreen Icon (hint_icon_offscreen)|choices|The icon to use when the hint is outside the player's view.}} | |||
{{KV|Show offscreen (hint_nooffscreen)|choices|When the hint is offscreen, do we show an icon and arrow? | |||
:*0: Show | |||
:*1: Don't show}} | |||
{{KV|Bound Command (hint_binding)|string|If using the '''show key bindings''' setting for the '''Onscreen Icon''' or '''Offscreen Icon''', this field should be the command we want to show bindings for. Use {{ent|key_listboundkeys}} to see all bound keys.}} | |||
{{KV|Icon Height Offset (hint_icon_offset)|float|A height offset from the '''Target Entity''''s origin to display the hint.}} | |||
{{KV|Size Pulsing (hint_pulseoption)|choices|Speed for which the icon should grow and shrink, as a way to nag the player about the object. | |||
:*0: No Pulse | |||
:*1: Slow Pulse | |||
:*2: Fast Pulse | |||
:*3: Urgent Pulse}} | |||
{{KV|Alpha Pulsing (hint_alphaoption)|choices|Speed for which icon will become more or less transparent. | |||
:*0: No Pulse | |||
:*1: Slow Pulse | |||
:*2: Fast Pulse | |||
:*3: Urgent Pulse}} | |||
{{KV|Shaking (hint_shakeoption)|choices|The icon can shake. | |||
:*0: No Shaking | |||
:*1: Narrow Shake | |||
:*2: Wide Shake}} | |||
{{KV|Timeout (hint_timeout)|integer|The automatic timeout for the hint. 0 will persist until stopped with <code>EndHint</code>.}} | |||
{{KV|Display Range (hint_range)|float|The visible range of the hint. 0 will show it at any distance.}} | |||
{{KV|Show on First Sight (hint_auto_start)|boolean|When the player first has [[LOS]] to the target, it will automatically show for them. {{l4d2}} only.}} | |||
{{KV|Lesson Name (hint_name)|string|Hints with the same lesson name use a common base and are treated as instances the same lesson type. {{l4d2}} only.}} | |||
{{KV|Display Limit (hint_display_limit)|integer|The number of times a hint can be seen. 0 means unlimited. {{l4d2}} only.}} | |||
{{KV|Instance Type (hint_instance_type)|choices|How many instances of a single lesson type can be open or active at the same time. {{l4d2}} only. | |||
:*0: Multiple | |||
:*1: Single Open (Prevents new hints from opening.) | |||
:*2: Fixed Replace (Ends other hints when a new one is shown.) | |||
:*3: Single Active (Hides other hints when a new one is shown.)}} | |||
{{KV|Suppress rest before moving (hint_suppress_rest)|choices|Suppress the initial icon display in center of screen? {{l4d2}} only. | |||
:*0: No | |||
:*1: Yes}} | |||
{{KV|Only Local Player (hint_local_player_only)|boolean|since=AS|Shows the hint ''only'' to the first player to join/create the server. | |||
:{{note|This keyvalue appears to have not been coded into the [[FGD]] correctly. You must put 0 for "No" and 1 for "Yes".}}}} | |||
{{KV|Gamepad Bound Command (hint_gamepad_binding)|string|since=p2|If using the '''show key bindings''' setting for the '''Onscreen Icon''' or '''Offscreen Icon''', this field should be the command we want to show bindings for, when the user is using a console/non-keyboard controller of some kind (or PS3/X360).}} | |||
{{KV BaseEntity}} | |||
==Inputs== | |||
{{IO|ShowHint|param=targetname|Start showing this hint. If an entity [[targetname]] is passed as the parameter, the hint is shown only to that entity. | |||
{{bug|In {{l4d2}}, hints triggered by this input are only visible to the {{ent|!activator}}.}} | |||
{{note|In {{portal2}}, you cannot display more than one hint at the same time.}}}} | |||
{{IO|EndHint|Stop showing the hint if it hasn't already timed out.}} | |||
{{I BaseEntity}} | |||
==Outputs== | |||
{{O BaseEntity}} | |||
==See Also== | |||
*[[L4D2 Level Design/Instructor Hints]] | |||
[[Category:GUI Entities]] | |||
Revision as of 15:21, 28 September 2018

Template:Base point It it used to instruct the player to do some things, such as not shoot teammates.

CEnvInstructorHint
class, defined in theenv_instructor_hint.cpp
file.
Icons

scripts/mod_textures.txt
located in the main pak01_dir.vpk for more icon options.Keyvalues
- Target Entity (hint_target) ([todo internal name (i)]) <targetname>
- The entity to show this hint on top of. The entity used must be one that is replicated on the client, or the hint will never show up. The info_target_instructor_hint entity is designed for this purpose, allowing the hint to be placed in empty space or parented to a specific location on another entity.

- Positioning (hint_static) ([todo internal name (i)]) <choices>
- Either show at the position of the Target Entity, or show the hint directly on the HUD at a fixed position.
- 0: Follow the Target Entity.
- 1: Show on the HUD.
- Allow invisible target (hint_allow_nodraw_target) ([todo internal name (i)]) <choices>
- Do we allow the hint to follow entities with nodraw set?
Confirm:EF_NODRAW?
- 0: End immediately on nodraw
- 1: Yes
- Caption (hint_caption) ([todo internal name (i)]) <string>
- The text of your hint. 100 character limit.
- Activator Caption (hint_activator_caption) ([todo internal name (i)]) <color255> (in all games since
)
- The color of the caption text, as seen by the !activator.
- Force caption (hint_forcecaption) ([todo internal name (i)]) <choices>
- Do we show the caption text even if the hint is occluded by (hidden behind) a wall?
- 0: No
- 1: Show when occluded
- Onscreen Icon (hint_icon_onscreen) ([todo internal name (i)]) <choices>
- The icon to use when the hint is within the player's view.
- Offscreen Icon (hint_icon_offscreen) ([todo internal name (i)]) <choices>
- The icon to use when the hint is outside the player's view.
- Show offscreen (hint_nooffscreen) ([todo internal name (i)]) <choices>
- When the hint is offscreen, do we show an icon and arrow?
- 0: Show
- 1: Don't show
- Bound Command (hint_binding) ([todo internal name (i)]) <string>
- If using the show key bindings setting for the Onscreen Icon or Offscreen Icon, this field should be the command we want to show bindings for. Use key_listboundkeys to see all bound keys.
- Icon Height Offset (hint_icon_offset) ([todo internal name (i)]) <float>
- A height offset from the Target Entity's origin to display the hint.
- Size Pulsing (hint_pulseoption) ([todo internal name (i)]) <choices>
- Speed for which the icon should grow and shrink, as a way to nag the player about the object.
- 0: No Pulse
- 1: Slow Pulse
- 2: Fast Pulse
- 3: Urgent Pulse
- Alpha Pulsing (hint_alphaoption) ([todo internal name (i)]) <choices>
- Speed for which icon will become more or less transparent.
- 0: No Pulse
- 1: Slow Pulse
- 2: Fast Pulse
- 3: Urgent Pulse
- Shaking (hint_shakeoption) ([todo internal name (i)]) <choices>
- The icon can shake.
- 0: No Shaking
- 1: Narrow Shake
- 2: Wide Shake
- Timeout (hint_timeout) ([todo internal name (i)]) <integer>
- The automatic timeout for the hint. 0 will persist until stopped with
EndHint
.
- Display Range (hint_range) ([todo internal name (i)]) <float>
- The visible range of the hint. 0 will show it at any distance.
- Show on First Sight (hint_auto_start) ([todo internal name (i)]) <boolean>
- When the player first has LOS to the target, it will automatically show for them.
only.
- Lesson Name (hint_name) ([todo internal name (i)]) <string>
- Hints with the same lesson name use a common base and are treated as instances the same lesson type.
only.
- Display Limit (hint_display_limit) ([todo internal name (i)]) <integer>
- The number of times a hint can be seen. 0 means unlimited.
only.
- Instance Type (hint_instance_type) ([todo internal name (i)]) <choices>
- How many instances of a single lesson type can be open or active at the same time.
only.
- 0: Multiple
- 1: Single Open (Prevents new hints from opening.)
- 2: Fixed Replace (Ends other hints when a new one is shown.)
- 3: Single Active (Hides other hints when a new one is shown.)
- Suppress rest before moving (hint_suppress_rest) ([todo internal name (i)]) <choices>
- Suppress the initial icon display in center of screen?
only.
- 0: No
- 1: Yes
- Only Local Player (hint_local_player_only) ([todo internal name (i)]) <boolean> (in all games since
)
- Shows the hint only to the first player to join/create the server.
Note:This keyvalue appears to have not been coded into the FGD correctly. You must put 0 for "No" and 1 for "Yes".
- Gamepad Bound Command (hint_gamepad_binding) ([todo internal name (i)]) <string> (in all games since
)
- If using the show key bindings setting for the Onscreen Icon or Offscreen Icon, this field should be the command we want to show bindings for, when the user is using a console/non-keyboard controller of some kind (or PS3/X360).
Inputs
- ShowHint <targetname >
- Start showing this hint. If an entity targetname is passed as the parameter, the hint is shown only to that entity.


- EndHint
- Stop showing the hint if it hasn't already timed out.