Zh/Env instructor hint: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
No edit summary
No edit summary
Line 74: Line 74:
:*1: Show when occluded/无视墙体显示}}
:*1: Show when occluded/无视墙体显示}}
{{KV|Onscreen Icon (hint_icon_onscreen)|choices|提示的图标。}}
{{KV|Onscreen Icon (hint_icon_onscreen)|choices|提示的图标。}}
{{KV|Offscreen Icon (hint_icon_offscreen)|choices|玩家视野之外采用的图标,应该是即将看不见的时候采用的图标?}}
{{KV|Offscreen Icon (hint_icon_offscreen)|choices|玩家视野之外采用的图标。}}
{{KV|Show offscreen (hint_nooffscreen)|choices|当图标在视野之外,是否还显示图标和箭头?
{{KV|Show offscreen (hint_nooffscreen)|choices|当图标在视野之外,是否还显示图标和箭头?
:*0: Show/显示
:*0: Show/显示
:*1: Don't 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|Bound Command (hint_binding)|字符串|如果使用了 '''show key bindings''' 设置,那么'''Onscreen Icon''' or '''Offscreen Icon''', 则显示你想要显示的按键图标, 参见{{ent|key_listboundkeys}} 查看支持的按键。}}
{{KV|Icon Height Offset (hint_icon_offset)|float|A height offset from the '''Target Entity''''s origin to display the hint.}}
{{KV|Icon Height Offset (hint_icon_offset)|浮点型| '''Target Entity''''坐标为原点,设置高度偏移的值,那么提示会显示在坐标点+偏移的高度位置。}}
{{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.
{{KV|Size Pulsing (hint_pulseoption)|choices|图标效果,图标收缩的速度。
:*0: No Pulse
:*0: No Pulse/无
:*1: Slow Pulse
:*1: Slow Pulse/缓慢
:*2: Fast Pulse
:*2: Fast Pulse/快速
:*3: Urgent Pulse}}
:*3: Urgent Pulse/非常快,紧急!}}
{{KV|Alpha Pulsing (hint_alphaoption)|choices|Speed for which icon will become more or less transparent.
{{KV|Alpha Pulsing (hint_alphaoption)|choices|图标会变透明和可见的速度。
:*0: No Pulse
:*0: No Pulse/无
:*1: Slow Pulse
:*1: Slow Pulse/缓慢
:*2: Fast Pulse
:*2: Fast Pulse/快速
:*3: Urgent Pulse}}
:*3: Urgent Pulse/非常快,紧急!}}
{{KV|Shaking (hint_shakeoption)|choices|The icon can shake.
{{KV|Shaking (hint_shakeoption)|choices|图标会抖动。
:*0: No Shaking
:*0: No Shaking/不抖动
:*1: Narrow Shake
:*1: Narrow Shake/较窄的抖动
:*2: Wide 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|Timeout (hint_timeout)|整数型|提示持续时间/秒,如果为0则代表无限,需要通过<code>EndHint</code>输入来关闭提示。}}
{{KV|Display Range (hint_range)|float|The visible range of the hint. 0 will show it at any distance.}}
{{KV|Display Range (hint_range)|浮点型|图标显示范围,0代表任何地方都显示。}}
{{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|Show on First Sight (hint_auto_start)|布尔型|当玩家的[[LOS]](视线)第一次看见时,会自动显示给所有人。 {{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|Lesson Name (hint_name)|字符串|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|Display Limit (hint_display_limit)|整数型|可以看到提示的次数。0代表无限次。 {{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.
{{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
:*0: Multiple
Line 104: Line 104:
:*2: Fixed Replace (Ends other hints when a new one is shown.)
:*2: Fixed Replace (Ends other hints when a new one is shown.)
:*3: Single Active (Hides 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.
{{KV|Suppress rest before moving (hint_suppress_rest)|choices|关闭图标? {{l4d2}} only.
:*0: No
:*0: No
:*1: Yes}}
:*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.
{{KV|Only Local Player (hint_local_player_only)|布尔型|since=AS|只显示给第一个加入服务器或者创建服务器的玩家。(异形从群之后的游戏。)
:{{注意|不存在于hammer属性键值,但确实有。请手动添加,并且0代表no,1代表yes。}}}}
{{KV|Gamepad Bound Command (hint_gamepad_binding)|字符串|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:zh}}


:{{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).}}
{{IO|ShowHint|param=targetname|开始显示提示. 如果参数填写了一个实体的名称,则只向此实体显示提示。
{{KV BaseEntity}}


==Inputs==
{{bug|在 {{l4d2}}中,此输出仅对{{ent|!activator}}可见。}}
{{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}}.}}
{{注意|In {{portal2}},无法同时显示多个提示.}}}}
{{IO|EndHint|停止显示提示。}}
{{I BaseEntity:zh}}


{{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.}}
{{O BaseEntity:zh}}
{{I BaseEntity}}
 
==Outputs==
{{O BaseEntity}}


==中文支持==
==中文支持==
百度网盘:https://pan.baidu.com/s/1q8ndRsErtm_fy0bIFZFo4g 提取码: hcit,大小:10.3KB
百度网盘:https://pan.baidu.com/s/1q8ndRsErtm_fy0bIFZFo4g 提取码: hcit,大小:10.3KB


==See Also==
==参见==
*[[L4D2 Level Design/Instructor Hints]]
*[[L4D2 Level Design/Instructor Hints]]


[[Category:GUI Entities]]
[[Category:GUI Entities]]

Revision as of 07:39, 14 October 2019

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)]) <目标实体名称(en)>
显示此实体提示的目标实体。 此实体必须是在客户端上复制的实体否则提示永远不会显示。实体info_target_instructor_hint 是专门用于解决此问题的,允许放在空处或者绑定到其他实体上,以至于在此实体的方位上显示提示。

Template:注意

Positioning (hint_static) ([todo internal name (i)]) <choices>
要么将提示显示在Target Entity位置, 要么显示在HUD 位置(玩家屏幕上):
  • 0: Follow the Target Entity./显示在 Target Entity
  • 1: Show on the HUD/显示在HUD上.
Allow invisible target (hint_allow_nodraw_target) ([todo internal name (i)]) <choices>
是否允许提示跟随设置了nodraw的实体?
证实:EF_NODRAW?
(非nodraw贴图指的是一种效果属性,可以阻止服务器向客户端传递此实体的任何数据,但不会删除此实体,也就代表客户端无法接受此实体的信息)
  • 0: End immediately on nodraw/当目标实体被nodraw则不跟随
  • 1: Yes/跟随
Caption (hint_caption) ([todo internal name (i)]) <字符串(en)>
提示的文本,最多100个字符。不支持中文。如果您需要中文,需要通过vscript脚本实现,请看下方的中文支持条目。
Caption Color (hint_color) ([todo internal name (i)]) <color255(en)>
提示文本的颜色。
Activator Caption (hint_activator_caption) ([todo internal name (i)]) <color255(en)> (存在于自 异形丛生 以来)
提示文本的颜色,由!activator看见的。(在异形从群之后的游戏。)
Force caption (hint_forcecaption) ([todo internal name (i)]) <choices>
被墙体盖住是否还显示提示?(是否可以无视墙体显示提示?)
  • 0: No/不显示
  • 1: Show when occluded/无视墙体显示
Onscreen Icon (hint_icon_onscreen) ([todo internal name (i)]) <choices>
提示的图标。
Offscreen Icon (hint_icon_offscreen) ([todo internal name (i)]) <choices>
玩家视野之外采用的图标。
Show offscreen (hint_nooffscreen) ([todo internal name (i)]) <choices>
当图标在视野之外,是否还显示图标和箭头?
  • 0: Show/显示
  • 1: Don't show/不显示
Bound Command (hint_binding) ([todo internal name (i)]) <字符串(en)>
如果使用了 show key bindings 设置,那么Onscreen Icon or Offscreen Icon, 则显示你想要显示的按键图标, 参见key_listboundkeys 查看支持的按键。
Icon Height Offset (hint_icon_offset) ([todo internal name (i)]) <浮点型(en)>
Target Entity'坐标为原点,设置高度偏移的值,那么提示会显示在坐标点+偏移的高度位置。
Size Pulsing (hint_pulseoption) ([todo internal name (i)]) <choices>
图标效果,图标收缩的速度。
  • 0: No Pulse/无
  • 1: Slow Pulse/缓慢
  • 2: Fast Pulse/快速
  • 3: Urgent Pulse/非常快,紧急!
Alpha Pulsing (hint_alphaoption) ([todo internal name (i)]) <choices>
图标会变透明和可见的速度。
  • 0: No Pulse/无
  • 1: Slow Pulse/缓慢
  • 2: Fast Pulse/快速
  • 3: Urgent Pulse/非常快,紧急!
Shaking (hint_shakeoption) ([todo internal name (i)]) <choices>
图标会抖动。
  • 0: No Shaking/不抖动
  • 1: Narrow Shake/较窄的抖动
  • 2: Wide Shake/较宽的抖动
Timeout (hint_timeout) ([todo internal name (i)]) <整数(en)>
提示持续时间/秒,如果为0则代表无限,需要通过EndHint输入来关闭提示。
Display Range (hint_range) ([todo internal name (i)]) <浮点型(en)>
图标显示范围,0代表任何地方都显示。
Show on First Sight (hint_auto_start) ([todo internal name (i)]) <布尔型(en)>
当玩家的LOS(视线)第一次看见时,会自动显示给所有人。 求生之路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)>
可以看到提示的次数。0代表无限次。 求生之路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>
关闭图标? 求生之路2 only.
  • 0: No
  • 1: Yes
Only Local Player (hint_local_player_only) ([todo internal name (i)]) <布尔型(en)> (存在于自 异形丛生 以来)
只显示给第一个加入服务器或者创建服务器的玩家。(异形从群之后的游戏。)
Template:注意
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).
Warning icon.png
This article has been marked as a candidate for speedy deletion for the following reason:
The redirect page got deleted, therefore this page should too.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.

输入

ShowHint <目标名(en)>
开始显示提示. 如果参数填写了一个实体的名称,则只向此实体显示提示。
Icon-Bug.png错误:求生之路2中,此输出仅对!activator可见。  [todo tested in ?]

Template:注意

EndHint
停止显示提示。
Base:
AddContext <字符串(en)>
添加到实体的 Response Contexts/响应上下文列表。格式是<key>:<value>
AddOutput <字符串(en)>
在此实体上分配新的键值/输出。对于键值,有些依赖于额外的必要代码来运行,如果它只是通过这个输入改变就行不通。必须遵循严格的格式:
语法:

ClearContext
从此实体的列表中删除所有上下文。
ClearParent
从移动层次结构中删除该实体,使其可以自由移动。
FireUser1 to FireUser4
触发相应的OnUser输出;详见 User Inputs and OutputsEnglish
Kill
从这个世界中删除此实体。
KillHierarchy
功能类似Kill,尽管此实体与其父实体都被删除了,但比Kill快一点。
RemoveContext
从实体列表删除一个上下文。名字应与现有上下文进行匹配。
SetParent <字符串(en)>
跟随此实体移动,详见 实体层级(依赖关系)
SetParentAttachment <字符串(en)>
更改此实体到其父级上的特定附属English点。实体将传送,以至于其骨骼方位English与附属匹配。在使用此输入前必须设置好实体的父实体。
SetParentAttachmentMaintainOffset <字符串(en)>
同上,但没有传送。在接收到输入时,实体保持其相对于附件的位置。
Use  不存在于FGD!
与调用 +use 的玩家相同[玩家按 +use(使用,默认E按钮)];大多数情况下没有影响。
DispatchResponse <字符串(en)> 不存在于FGD!
向实体发送一个上下文。 详见 ResponseEnglishConceptEnglish.
DispatchEffect <字符串(en)> (被移除求生之路 以来) 不存在于FGD!
在实体的原点坐标设置一个特定效果;参见 List of Client EffectsEnglish。自从求生之路 求生之路后由粒子系统取代。
RunScriptFile <脚本(en)> (存在于自 求生之路2 以来)
从硬盘执行一个 VScript 脚本文件,不带文件后缀名。会合并接收实体的脚本域。
RunScriptCode <字符串(en)> (存在于自 求生之路2 以来)
在接收输入的实体范围内执行一串 VScript 源代码。通过控制台触发时可能需要字符串引用。
Icon-Bug.png错误:在 Hammer 中,使用带有字符串的参数会破坏 VMFEnglish 文件的结构,使下一个 Hammer 会话无法查看该文件。  [todo tested in ?]
Note.png修复:使用文本编辑器手动删除带有字符串的参数。
CallScriptFunction <字符串(en)> (存在于自 求生之路2 以来) 不存在于FGD!
在接受实体脚本域上执行一段 VScript 函数。
SetLocalOrigin <coordinates(en)> (存在于自 异形丛生 以来) 不存在于FGD!
将此实体设置到地图中的某个位置。如果此实体是某实体父级,那么它的子级也会随着移动。
SetLocalAngles <angles(en)> (存在于自 异形丛生 以来) 不存在于FGD!
设置该实体的角度。

输出

Base/基础:

OnUser1 to OnUser4
这些输出将分别响应于 FireUser1FireUser4 输入。 详见 User Inputs and Outputs

中文支持

百度网盘:https://pan.baidu.com/s/1q8ndRsErtm_fy0bIFZFo4g 提取码: hcit,大小:10.3KB

参见