Zh/Env instructor hint: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
m (Use chinese templates and update page formatting.)
(更新)
Line 1: Line 1:
{{lang|Env instructor hint}}
{{lang|Env instructor hint|title={{MdCode|oneclick|background=transparent|env_instructor_hint}}}}
[[File:env_instructor_hint.gif|left|link=]]
{{infotable
|env_instructor_hint|img=[[File:env_instructor_hint.gif]]
|type=e0
|engine=2
|in={{l4d2|4|suf=:zh-cn}}
|suf=:zh-cn
}} {{point ent|suf=:zh-cn|iconblock=0|this=0|engine={{source|4}}|since=Left 4 Dead 2}}用于指示/提示玩家做一些事情,例如不要攻击队友!
[[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-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}}

Revision as of 09:07, 11 January 2023

English (en)中文 (zh)Translate (Translate)
env_instructor_hint
Env instructor hint.gif
类型点实体
引擎起源 起源
可用性求生之路2 求生之路2
 

Template:Point ent用于指示/提示玩家做一些事情,例如不要攻击队友!

一个传送门2的例子。
例:绑定按键提示图标,Bound Command 为"jump" (没引号) 并且 Caption设置为 "Bet you can't jump over me!" (没引号).


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

Template:注意

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的实体?
证实:EF_NODRAW?
(非nodraw贴图指的是一种效果属性,可以阻止服务器向客户端传递此实体的任何数据,但不会删除此实体,也就代表客户端无法接受此实体的信息)
  • 0: End immediately on nodraw/当目标实体被nodraw则不跟随
  • 1: Yes/跟随
Caption (hint_caption) <字符串(en)>
提示的文本,最多100个字符。不支持中文。如果您需要中文,需要通过vscript脚本实现,请看下方的中文支持条目。
Caption Color (hint_color) <color255(en)>
提示文本的颜色。
Activator Caption (hint_activator_caption) <color255(en)> (存在于自 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) <字符串(en)>
如果使用了 show key bindings 设置,那么Onscreen Icon or Offscreen Icon, 则显示你想要显示的按键图标, 参见key_listboundkeys 查看支持的按键。
Icon Height Offset (hint_icon_offset) <浮点型(en)>
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) <整数(en)>
提示持续时间/秒,如果为0则代表无限,需要通过EndHint输入来关闭提示。
Display Range (hint_range) <浮点型(en)>
图标显示范围,0代表任何地方都显示。
Show on First Sight (hint_auto_start) <布尔型(en)>
当玩家的LOS(视线)第一次看见时,会自动显示给所有人。 (仅存在于 求生之路2 中)
Lesson Name (hint_name) <字符串(en)>
Hints with the same lesson name use a common base and are treated as instances the same lesson type. (仅存在于 求生之路2 中)
Display Limit (hint_display_limit) <整数(en)>
可以看到提示的次数。0代表无限次。 (仅存在于 求生之路2 中)
Instance Type (hint_instance_type) <choices>
How many instances of a single lesson type can be open or active at the same time. (仅存在于 求生之路2 中)
  • 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) <choices>
关闭图标? (仅存在于 求生之路2 中).
  • 0: No/没有
  • 1: Yes/是
Only Local Player (hint_local_player_only) <布尔型(en)> (存在于自 AS 以来)
只显示给第一个加入服务器或者创建服务器的玩家。(异形从群之后的游戏。)
Template:注意
Gamepad Bound Command (hint_gamepad_binding) <字符串(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).

Template:KV BaseEntity:zh-cn

输入

ShowHint <目标名(en)>
开始显示提示. 如果参数填写了一个实体的名称,则只向此实体显示提示。

Template:Bug:zh-cn

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

参见