Env instructor hint

From Valve Developer Community
< Zh
Revision as of 23:06, 13 October 2019 by 求生的兔 (talk | contribs)
Jump to navigation Jump to search
English (en)中文 (zh)Translate (Translate)
Env instructor hint.gif
一个传送门2的例子。
例:绑定按键提示图标,Bound Command 为"jump" (没引号) 并且 Caption设置为 "Bet you can't jump over me!" (没引号).

起源 env_instructor_hint是一个存在于所有的 起源 游戏自从 Template:Name=Left 4 Dead 2 以来的点实体。 用于指示/提示玩家做一些事情,例如不要攻击队友!


待完善: This template is currently using deprecated suf or {{Lang}}-based translations. Please use the main {{Code class}} instead, which uses {{Autolang}}.

在源代码中,它由 class CEnvInstructorHint 代表,定义于 env_instructor_hint.cpp


图标

图标名称 图标 图标名称 图标
icon_tip Hint 001 icon tip.jpg icon_interact Hint 009 icon interact.jpg
icon_info Hint 002 icon info.jpg icon_button Hint 010 icon button.jpg
icon_shield Hint 003 icon shield.jpg icon_door Hint 011 icon door.jpg
icon_alert Hint 004 icon alert.jpg icon_arrow_plain Hint 012 icon arrow plain.jpg
icon_alert_red Hint 005 icon alert red.jpg icon_arrow_plain_white_dn Hint 013 icon arrow plain white dn.jpg
icon_tip (again) Hint 006 icon tip (again).jpg icon_arrow_plain_white_up Hint 014 icon arrow plain white up.jpg
icon_skull Hint 007 icon skull.jpg icon_arrow_up Hint 015 icon arrow up.jpg
icon_no Hint 008 icon no.jpg icon_arrow_right Hint 016 icon arrow right.jpg

Template:注意

键值

Target Entity (hint_target) ([todo internal name (i)]) <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 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.png注意:If an info_target entity is used, the spawnflag to always transmit to the client must be checked.
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?
证实:EF_NODRAW?
  • 0: End immediately on nodraw
  • 1: Yes
Caption (hint_caption) ([todo internal name (i)]) <字符串(en)>
提示的文本,最多100个字符。不支持中文。如果您需要中文,需要通过vscript脚本实现,请看下方的中文支持条目。
Caption Color (hint_color) ([todo internal name (i)]) <color255(en)>
The color of the caption text.
Activator Caption (hint_activator_caption) ([todo internal name (i)]) <color255(en)> (存在于自 异形丛生 以来)
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)]) <字符串(en)>
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)]) <浮点型(en)>
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)]) <整数(en)>
The automatic timeout for the hint. 0 will persist until stopped with EndHint.
Display Range (hint_range) ([todo internal name (i)]) <浮点型(en)>
The visible range of the hint. 0 will show it at any distance.
Show on First Sight (hint_auto_start) ([todo internal name (i)]) <布尔值(en)>
When the player first has LOS to the target, it will automatically show for them. 求生之路2 only.
Lesson Name (hint_name) ([todo internal name (i)]) <字符串(en)>
Hints with the same lesson name use a common base and are treated as instances the same lesson type. 求生之路2 only.
Display Limit (hint_display_limit) ([todo internal name (i)]) <整数(en)>
The number of times a hint can be seen. 0 means unlimited. 求生之路2 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. 求生之路2 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? 求生之路2 only.
  • 0: No
  • 1: Yes
Only Local Player (hint_local_player_only) ([todo internal name (i)]) <布尔值(en)> (存在于自 异形丛生 以来)
Shows the hint only to the first player to join/create the server.
Note.png注意: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)]) <字符串(en)> (存在于自 传送门2 以来)
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 <目标名(en)>
Start showing this hint. If an entity targetname is passed as the parameter, the hint is shown only to that entity.
Icon-Bug.png错误:In 求生之路2, hints triggered by this input are only visible to the !activator.  [todo tested in ?]
Note.png注意:In 传送门2, you cannot display more than one hint at the same time.
EndHint
Stop showing the hint if it hasn't already timed out.


Outputs

See Also