Zh/Env instructor hint: Difference between revisions
< Zh
Jump to navigation
Jump to search
No edit summary |
m (Use chinese templates and update page formatting.) |
||
Line 3: | Line 3: | ||
[[File:Instructorhint.png|right|thumb|一个传送门2的例子。]] | [[File:Instructorhint.png|right|thumb|一个传送门2的例子。]] | ||
[[File:Hint_017_show_key_bindings.jpg|thumb|right|例:绑定按键提示图标,'''Bound Command''' 为"jump" (没引号) 并且 '''Caption'''设置为 "Bet you can't jump over me!" (没引号).]] | [[File:Hint_017_show_key_bindings.jpg|thumb|right|例:绑定按键提示图标,'''Bound Command''' 为"jump" (没引号) 并且 '''Caption'''设置为 "Bet you can't jump over me!" (没引号).]] | ||
{{point_ent:zh|env_instructor_hint|since=Left 4 Dead 2}} 用于指示/提示玩家做一些事情,例如不要攻击队友! | {{point_ent:zh-cn|env_instructor_hint|since=Left 4 Dead 2}} 用于指示/提示玩家做一些事情,例如不要攻击队友! | ||
{{code class:zh|CEnvInstructorHint|env_instructor_hint.cpp}} | {{code class:zh|CEnvInstructorHint|env_instructor_hint.cpp}} | ||
Line 59: | Line 59: | ||
==键值== | ==键值== | ||
{{KV|Target Entity | {{KV:zh-cn|Target Entity|intn=hint_target|目标实体名称|显示此实体提示的目标实体。 此实体必须是在客户端上复制的实体否则提示永远不会显示。实体{{ent:zh-cn|info_target_instructor_hint}} 是专门用于解决此问题的,允许放在空处或者绑定到其他实体上,以至于在此实体的方位上显示提示。 | ||
{{注意|如果一个{{ent|info_target}}实体被使用, 必须检查标签always transmit to the client是否被勾选。}}}} | {{注意|如果一个{{ent:zh-cn|info_target}}实体被使用, 必须检查标签always transmit to the client是否被勾选。}}}} | ||
{{KV|Positioning | {{KV:zh-cn|Positioning|intn=hint_static|choices|要么将提示显示在'''Target Entity'''位置, 要么显示在[[HUD]] 位置(玩家屏幕上): | ||
:*0: Follow the '''Target Entity'''./显示在 '''Target Entity''' | :*0: Follow the '''Target Entity'''./显示在 '''Target Entity''' | ||
:*1: Show on the HUD/显示在HUD上.}} | :*1: Show on the HUD/显示在HUD上.}} | ||
{{KV|Allow invisible target | {{KV:zh-cn|Allow invisible target|intn=hint_allow_nodraw_target|choices|是否允许提示跟随设置了nodraw的实体? {{confirm:zh-cn|{{ent:zh-cn|EF_NODRAW}}?}}(非nodraw贴图指的是一种效果属性,可以阻止服务器向客户端传递此实体的任何数据,但不会删除此实体,也就代表客户端无法接受此实体的信息) | ||
:*0: End immediately on nodraw/当目标实体被nodraw则不跟随 | :*0: End immediately on nodraw/当目标实体被nodraw则不跟随 | ||
:*1: Yes/跟随}} | :*1: Yes/跟随}} | ||
{{KV|Caption | {{KV:zh-cn|Caption|intn=hint_caption|字符串|提示的文本,最多100个字符。不支持中文。如果您需要中文,需要通过vscript脚本实现,请看下方的中文支持条目。}} | ||
{{KV|Caption Color | {{KV:zh-cn|Caption Color|intn=hint_color|color255|提示文本的颜色。}} | ||
{{KV|Activator Caption | {{KV:zh-cn|Activator Caption|intn=hint_activator_caption|color255|since=AS|提示文本的颜色,由{{ent:zh-cn|!activator}}看见的。(在异形从群之后的游戏。)}} | ||
{{KV|Force caption | {{KV:zh-cn|Force caption|intn=hint_forcecaption|choices|被墙体盖住是否还显示提示?(是否可以无视墙体显示提示?) | ||
:*0: No/不显示 | :*0: No/不显示 | ||
:*1: Show when occluded/无视墙体显示}} | :*1: Show when occluded/无视墙体显示}} | ||
{{KV|Onscreen Icon | {{KV:zh-cn|Onscreen Icon|intn=hint_icon_onscreen|choices|提示的图标。}} | ||
{{KV|Offscreen Icon | {{KV:zh-cn|Offscreen Icon|intn=hint_icon_offscreen|choices|玩家视野之外采用的图标。}} | ||
{{KV|Show offscreen | {{KV:zh-cn|Show offscreen|intn=hint_nooffscreen|choices|当图标在视野之外,是否还显示图标和箭头? | ||
:*0: Show/显示 | :*0: Show/显示 | ||
:*1: Don't show/不显示}} | :*1: Don't show/不显示}} | ||
{{KV|Bound Command | {{KV:zh-cn|Bound Command|intn=hint_binding|字符串|如果使用了 '''show key bindings''' 设置,那么'''Onscreen Icon''' or '''Offscreen Icon''', 则显示你想要显示的按键图标, 参见{{ent:zh-cn|key_listboundkeys}} 查看支持的按键。}} | ||
{{KV|Icon Height Offset | {{KV:zh-cn|Icon Height Offset|intn=hint_icon_offset|浮点型| 以'''Target Entity''''坐标为原点,设置高度偏移的值,那么提示会显示在坐标点+偏移的高度位置。}} | ||
{{KV|Size Pulsing | {{KV:zh-cn|Size Pulsing|intn=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 | {{KV:zh-cn|Alpha Pulsing|intn=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 | {{KV:zh-cn|Shaking|intn=hint_shakeoption|choices|图标会抖动。 | ||
:*0: No Shaking/不抖动 | :*0: No Shaking/不抖动 | ||
:*1: Narrow Shake/较窄的抖动 | :*1: Narrow Shake/较窄的抖动 | ||
:*2: Wide Shake/较宽的抖动}} | :*2: Wide Shake/较宽的抖动}} | ||
{{KV|Timeout | {{KV:zh-cn|Timeout|intn=hint_timeout|整数型|提示持续时间/秒,如果为0则代表无限,需要通过<code>EndHint</code>输入来关闭提示。}} | ||
{{KV|Display Range | {{KV:zh-cn|Display Range|intn=hint_range|浮点型|图标显示范围,0代表任何地方都显示。}} | ||
{{KV|Show on First Sight | {{KV:zh-cn|Show on First Sight|intn=hint_auto_start|布尔型|当玩家的[[LOS]](视线)第一次看见时,会自动显示给所有人。 {{only:zh-cn|{{l4d2}}}}}} | ||
{{KV|Lesson Name | {{KV:zh-cn|Lesson Name|intn=hint_name|字符串|Hints with the same lesson name use a common base and are treated as instances the same lesson type. {{only:zh-cn|{{l4d2}}}}}} | ||
{{KV|Display Limit | {{KV:zh-cn|Display Limit|intn=hint_display_limit|整数型|可以看到提示的次数。0代表无限次。 {{only:zh-cn|{{l4d2}}}}}} | ||
{{KV|Instance Type | {{KV:zh-cn|Instance Type|intn=hint_instance_type|choices|How many instances of a single lesson type can be open or active at the same time. {{only:zh-cn|{{l4d2}}}} | ||
:*0: Multiple | :*0: Multiple | ||
:*1: Single Open (Prevents new hints from opening.) | :*1: Single Open (Prevents new hints from opening.) | ||
:*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 | {{KV:zh-cn|Suppress rest before moving|intn=hint_suppress_rest|choices|关闭图标? {{only:zh-cn|{{l4d2}}}}. | ||
:*0: No | :*0: No/没有 | ||
:*1: Yes}} | :*1: Yes/是}} | ||
{{KV|Only Local Player | {{KV:zh-cn|Only Local Player|intn=hint_local_player_only|布尔型|since=AS|只显示给第一个加入服务器或者创建服务器的玩家。(异形从群之后的游戏。) | ||
:{{注意|不存在于hammer属性键值,但确实有。请手动添加,并且0代表no,1代表yes。}}}} | :{{注意|不存在于hammer属性键值,但确实有。请手动添加,并且0代表no,1代表yes。}}}} | ||
{{KV|Gamepad Bound Command | {{KV:zh-cn|Gamepad Bound Command|intn=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}} | {{KV BaseEntity:zh-cn}} | ||
==输入== | ==输入== | ||
{{IO|ShowHint|param=targetname|开始显示提示. 如果参数填写了一个实体的名称,则只向此实体显示提示。 | {{IO:zh-cn|ShowHint|param=targetname|开始显示提示. 如果参数填写了一个实体的名称,则只向此实体显示提示。 | ||
{{bug|在 {{l4d2}}中,此输出仅对{{ent|!activator}}可见。}} | {{bug:zh-cn|在 {{l4d2}}中,此输出仅对{{ent:zh-cn|!activator}}可见。}} | ||
{{注意|In {{portal2}},无法同时显示多个提示.}}}} | {{注意|In {{portal2}},无法同时显示多个提示.}}}} | ||
{{IO|EndHint|停止显示提示。}} | {{IO:zh-cn|EndHint|停止显示提示。}} | ||
{{I BaseEntity:zh}} | {{I BaseEntity:zh-cn}} | ||
==输出== | ==输出== | ||
{{O BaseEntity:zh}} | {{O BaseEntity:zh-cn}} | ||
==中文支持== | ==中文支持== | ||
Line 128: | Line 128: | ||
==参见== | ==参见== | ||
*[[L4D2 Level Design/Instructor Hints]] | *[[L4D2 Level Design/Instructor Hints:zh-cn]] | ||
[[Category:GUI Entities]] | [[Category:GUI Entities:zh-cn]] |
Revision as of 18:06, 14 September 2021

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
。
图标
键值
- Target Entity
(hint_target)
<目标实体名称 > - 显示此实体提示的目标实体。 此实体必须是在客户端上复制的实体否则提示永远不会显示。实体info_target_instructor_hint 是专门用于解决此问题的,允许放在空处或者绑定到其他实体上,以至于在此实体的方位上显示提示。
- Positioning
(hint_static)
<choices> - 要么将提示显示在Target Entity位置, 要么显示在HUD 位置(玩家屏幕上):
- 0: Follow the Target Entity./显示在 Target Entity
- 1: Show on the HUD/显示在HUD上.
- Allow invisible target
(hint_allow_nodraw_target)
<choices> - 是否允许提示跟随设置了nodraw的实体? (非nodraw贴图指的是一种效果属性,可以阻止服务器向客户端传递此实体的任何数据,但不会删除此实体,也就代表客户端无法接受此实体的信息)
证实:EF_NODRAW?
- 0: End immediately on nodraw/当目标实体被nodraw则不跟随
- 1: Yes/跟随
- Caption
(hint_caption)
<字符串 > - 提示的文本,最多100个字符。不支持中文。如果您需要中文,需要通过vscript脚本实现,请看下方的中文支持条目。
- Caption Color
(hint_color)
<color255 > - 提示文本的颜色。
- Activator Caption
(hint_activator_caption)
<color255 > (存在于自 AS 以来) - 提示文本的颜色,由!activator看见的。(在异形从群之后的游戏。)
- Force caption
(hint_forcecaption)
<choices> - 被墙体盖住是否还显示提示?(是否可以无视墙体显示提示?)
- 0: No/不显示
- 1: Show when occluded/无视墙体显示
- Onscreen Icon
(hint_icon_onscreen)
<choices> - 提示的图标。
- Offscreen Icon
(hint_icon_offscreen)
<choices> - 玩家视野之外采用的图标。
- Show offscreen
(hint_nooffscreen)
<choices> - 当图标在视野之外,是否还显示图标和箭头?
- 0: Show/显示
- 1: Don't show/不显示
- Bound Command
(hint_binding)
<字符串 > - 如果使用了 show key bindings 设置,那么Onscreen Icon or Offscreen Icon, 则显示你想要显示的按键图标, 参见key_listboundkeys 查看支持的按键。
- Icon Height Offset
(hint_icon_offset)
<浮点型 > - 以Target Entity'坐标为原点,设置高度偏移的值,那么提示会显示在坐标点+偏移的高度位置。
- Size Pulsing
(hint_pulseoption)
<choices> - 图标效果,图标收缩的速度。
- 0: No Pulse/无
- 1: Slow Pulse/缓慢
- 2: Fast Pulse/快速
- 3: Urgent Pulse/非常快,紧急!
- Alpha Pulsing
(hint_alphaoption)
<choices> - 图标会变透明和可见的速度。
- 0: No Pulse/无
- 1: Slow Pulse/缓慢
- 2: Fast Pulse/快速
- 3: Urgent Pulse/非常快,紧急!
- Shaking
(hint_shakeoption)
<choices> - 图标会抖动。
- 0: No Shaking/不抖动
- 1: Narrow Shake/较窄的抖动
- 2: Wide Shake/较宽的抖动
- Timeout
(hint_timeout)
<整数 > - 提示持续时间/秒,如果为0则代表无限,需要通过
EndHint
输入来关闭提示。
- Display Range
(hint_range)
<浮点型 > - 图标显示范围,0代表任何地方都显示。
- Lesson Name
(hint_name)
<字符串 > - Hints with the same lesson name use a common base and are treated as instances the same lesson type. (仅存在于
中)
- Display Limit
(hint_display_limit)
<整数 > - 可以看到提示的次数。0代表无限次。 (仅存在于
中)
- Instance Type
(hint_instance_type)
<choices> - How many instances of a single lesson type can be open or active at the same time. (仅存在于
中)
- 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.)
- Only Local Player
(hint_local_player_only)
<布尔型 > (存在于自 AS 以来) - 只显示给第一个加入服务器或者创建服务器的玩家。(异形从群之后的游戏。)
- Template:注意
- Gamepad Bound Command
(hint_gamepad_binding)
<字符串 > (存在于自以来)
- 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).
输入
- ShowHint <目标名 >
- 开始显示提示. 如果参数填写了一个实体的名称,则只向此实体显示提示。
- EndHint
- 停止显示提示。
Base:
- AddContext <字符串 >
- 添加到实体的 Response Contexts/响应上下文列表。格式是
<key>:<value>
。
语法:
- ClearContext
- 从此实体的列表中删除所有上下文。
- ClearParent
- 从移动层次结构中删除该实体,使其可以自由移动。
- FireUser1 to FireUser4
- 触发相应的
OnUser
输出;详见 User Inputs and Outputs。
- Kill
- 从这个世界中删除此实体。
- KillHierarchy
- 功能类似
Kill
,尽管此实体与其父实体都被删除了,但比Kill
快一点。
- RemoveContext
- 从实体列表删除一个上下文。名字应与现有上下文进行匹配。
- SetParent <字符串 >
- 跟随此实体移动,详见 实体层级(依赖关系)。
- SetParentAttachmentMaintainOffset <字符串 >
- 同上,但没有传送。在接收到输入时,实体保持其相对于附件的位置。
- DispatchResponse <字符串 > 不存在于FGD!
- 向实体发送一个上下文。 详见 Response
和 Concept
.
- DispatchEffect <字符串 > (被移除于
以来) 不存在于FGD!
- 在实体的原点坐标设置一个特定效果;参见 List of Client Effects
。自从
求生之路后由粒子系统取代。
- RunScriptCode <字符串 > (存在于自
以来)
- 在接收输入的实体范围内执行一串 VScript 源代码。通过控制台触发时可能需要字符串引用。
修复:使用文本编辑器手动删除带有字符串的参数。
- SetLocalOrigin <coordinates > (存在于自
以来) 不存在于FGD!
- 将此实体设置到地图中的某个位置。如果此实体是某实体父级,那么它的子级也会随着移动。
输出
Base/基础:
- OnUser1 to OnUser4
- 这些输出将分别响应于
FireUser1
到FireUser4
输入。 详见 User Inputs and Outputs。
中文支持
百度网盘:https://pan.baidu.com/s/1q8ndRsErtm_fy0bIFZFo4g 提取码: hcit,大小:10.3KB