Zh/Info director: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
(Created page with "{{toc-right}} {{l4d series point|info_director}} It is the notorious AI Director, and must exist in every L4D and L4D2 map for normal gameplay. The directo...")
 
m (Multipage removal)
 
(57 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{this is a|point entity|name=info_director|series=Left 4 Dead|notext=1}}
{{toc-right}}
{{toc-right}}
它是臭名昭著的 AI 导演,必须存在于每个求生之路和{{L|Left 4 Dead 2|求生之路2}}地图中才能正常游戏。


{{l4d series point|info_director}}
导演几乎完全自动化,仅在设计时存在于其他设计师放置的实体需要与其进行通信的少数情况下,例如在战役开场动画开始时强迫幸存者到他们各自的 {{L|info_survivor_position}}
It is the notorious AI Director, and must exist in every L4D and [[Left 4 Dead 2|L4D2]] map for normal gameplay.


The director is almost entirely automated and only exists at design-time for the few situations in which other designer-placed entities need to communicate with it, such as for forcing survivors to their respective [[info_survivor_position]] at the start of a campaign for camera intro sequences.
{{L|logic_director_query}}{{since:zh-cn|{{l4d2}}}}可以输出导演的愤怒等级,让关卡设计师可以根据玩家的表现来调整条件。


{{l4d2 add|[[logic_director_query]]}} can output the director's anger level, allowing level designers to adjust conditions according to how well the players are doing.
== 强制至幸存者位置 ==
如果幸存者设置了幸存者名称,导演可以强制所有幸存者站在 {{L|info_survivor_position}} 处。<br>
这用于战役开始时,以防止幸存者在地图下方生成,或在结局中将幸存者传送出地图以暗示他们在逃离载具内。


== Caveats ==
为此,请转到 info_director 输出并添加以下输出:
; Using the [[changelevel]] console command to restart the map will cause the director to ignore the <code>forcesurvivorpositions</code> input.
{| {{OutputsTable}}
: If you are restarting the map after a fresh compile using changelevel and you need to test out your intro sequence, use the kill console command afterwards to have the mission fail, this will cause the map to restart in a way that allows the info_director to use forcesurvivorpositions input, which will also allow your cameras to function.
| [[File:Io11.png]] || OnGameplayStart|| !self || ForceSurvivorPositions || <none> || 0.00 || No
; [[logic_auto]] cannot trigger <code>forcesurvivorpositions</code> unless the map was freshly loaded from the game menu as a campaign, or is restarting after mission failure.
|-
: To get around this, have the director call forcesurvivorpositions and releasesurvivorpositions on itself using the <code>ongamestart</code> input. When your campaign is ready for release, you can safely change it back to using a logic_auto before final compilation if you wish, since players will be loading your campaign from the game menu.
| [[File:Io11.png]] || OnGameplayStart|| !self || ReleaseSurvivorPositions || <none> || 0.20 || No
|}


== Keyvalues ==
=== 注意事项 ===
{{KV Targetname}}
* 使用 {{L|changelevel}} 控制台命令重新启动地图将导致导演忽略<code>forcesurvivorpositions</code>输入。
{{KV Origin}}
: 如果你在使用<code>changelevel</code>重新编译后重新启动地图并且你需要测试你的开场动画,请在之后使用<code>kill</code>控制台命令使任务失败,这将导致地图以重新启动的方式允许 info_director 使用<code>forcesurvivorpositions</code>输入,这也将允许你的相机运行。
* {{L|logic_auto}} 不能触发<code>forcesurvivorpositions</code>除非地图是从游戏菜单中作为战役新加载的,或者在任务失败后重新启动。
: 为了解决这个问题,让导演使用<code>ongamestart</code>输入对自己调用<code>forcesurvivorpositions</code>和<code>releasesurvivorpositions</code>。当你的战役准备好发布时,如果你仍然想这样做,你可以在最终编译之前安全地将其改回使用 logic_auto,因为玩家将从游戏菜单加载你的战役。


== Inputs ==
== 键值 ==
==={{l4d}} Original inputs===
{{KV Targetname:zh-cn|}}
{{KV|{{L|Origin}} (X Y Z) (origin)|coordinates|实体处于世界中的位置,旋转实体会以实体坐标原点旋转。}}
 
== 输入 ==
==={{l4d}} 原始输入===
; <code>PanicEvent</code>
; <code>PanicEvent</code>
: Fired when a major event happens that the director should know about.
: 当地图发生某些你认为重要的事情时,应该让导演知道。
; <code>PanicEventControlled <[[int]]></code>
; <code>PanicEventControlled <{{L|int}}></code>
: Like Panic Event, but allows for some control of intensity, via the number of waves. Standard values are 1 for earlier maps, 2 for later maps.
: 类似于恐慌事件,但允许通过波的数量对强度进行一些控制。早期地图的标准值为 1,后期地图为 2。
: {{note|PanicEventControlled only works in L4D1. In L4D2, a series of panic event (and much more!) are triggered by running director [[L4D2 Vscripts|vscripts]].}}
: {{note|PanicEventControlled 仅适用于 L4D1。在 L4D2 中,运行导演{{L|L4D2 Vscripts|脚本}}会触发一系列恐慌事件(以及更多!)。}}
; <code>ForceSurvivorPositions</code>
; <code>ForceSurvivorPositions</code>
: Make each survivor stand at an info_survivor_position.
: 让每个幸存者站在一个 info_survivor_position。
: {{note|还隐藏 HUD,除了生还者模式和清道夫模式特定的 HUD。}}
; <code>ReleaseSurvivorPositions</code>
; <code>ReleaseSurvivorPositions</code>
: Allow survivors to move freely again.
: 让幸存者再次自由行动。
; <code>FireConceptToAny <[[string]]></code>
: {{note|还可以再次启用 HUD。}}
: Fire a speech concept to any survivor that is capable of speaking it. Allows survivor dialogue to be triggered by map entities (e.g. No Mercy's elevator with parameter hospital04_path4)
; <code>FireConceptToAny <{{L|string}}></code>
: 向任何能够说出它的幸存者触发一个演讲概念。允许由地图实体触发幸存者对话(例如,带有参数 hospital04_path4 的毫不留情的电梯)
; <code>StartIntro</code>
; <code>StartIntro</code>
: Fire when the intro starts. Players are immune to damage while this is active. No mobs or SI will spawn.
: 开场动画开始时触发。玩家在此(输出)激活时免疫伤害。不会产生丧尸或特殊感染者。
; <code>FinishIntro</code>
; <code>FinishIntro</code>
: Fire when the intro ends. Players will now take damage. Mobs and SI can spawn given that the player is no longer standing in a nav square marked as PLAYER_START and/or CHECKPOINT.
: 开场动画结束时触发。玩家现在会受到伤害。鉴于玩家不再站在标记为 PLAYER_START /CHECKPOINT 的导航方块中,丧尸和特殊感染者可以生成。
; <code>EnableTankFrustration</code>
; <code>EnableTankFrustration</code>
: Can be used to enable the tank frustration meter.
: 可用于启用Tank玩家在太长时间没有伤害幸存者时得到的超时(Tank 可以气死)。
; <code>DisableTankFrustration</code>
; <code>DisableTankFrustration</code>
: Can be used to disable the tank frustration meter.
: 可用于禁用Tank玩家在太长时间没有伤害幸存者时得到的超时(Tank 不能气死)。
{{I Targetname}}
{{I Targetname:zh-cn}}
==={{l4d2}} Additional inputs===
 
The following are additional inputs only available in L4D2.
==={{l4d2}} 额外输入===
; <code>BeginScript <[[string]]></code>
以下是仅在 L4D2 中可用的额外输入。
; <code>BeginScript <{{L|string}}></code>
; <code>EndScript</code>
; <code>EndScript</code>
: {{sq}}Begin/End a [[L4D2_Director_Scripts|Director VScript]].
: {{sq}}开始/结束一个{{L|L4D2_Director_Scripts|导演脚本}}。"BeginScript" 将自动结束任何正在运行的脚本,以启动另一个脚本。
; <code>ScriptedPanicEvent</code>
; <code>ScriptedPanicEvent</code>
: {{sq}}Run a [[L4D2_Director_Scripts#Finales_and_Scripted_Panic_Events|Scripted Panic Event]], a staged event similar to a finale.
: {{sq}}运行一个[[L4D2_Director_Scripts#Finales_and_Scripted_Panic_Events|脚本化的恐慌事件]],类似于大结局的阶段事件。
; <code>ForcePanicEvent</code>
; <code>ForcePanicEvent</code>
: Trigger a panic event, no matter what else is going on.
: 触发恐慌事件,无论发生什么。
; <code>EndCustomScriptedStage</code>
; <code>EndCustomScriptedStage</code>
: {{sq}}End a scripted type finale stage.
: {{sq}}结束脚本化的结局阶段。
; <code>IncrementTeamScore <[[int]]></code>
; <code>IncrementTeamScore <{{L|int}}></code>
: Increment a team's score. (2=survivors, 3=infected)
: 增加一个团队的分数。(2=survivors, 3=infected)
; <code>CreateNewJournal <[[string]]></code>
; <code>CreateNewJournal <{{L|string}}></code>
: Create a new journal.
: 创建一个新日志。
; <code>WriteToJournal <[[string]]></code>
; <code>WriteToJournal <{{L|string}}></code>
: Add a task to the I/O Journal.
: 将任务写入到 I/O 日志。
; <code>ExecuteJournal <[[string]]></code>
; <code>ExecuteJournal <{{L|string}}></code>
: Execute all tasks in the specified journal
: 执行指定日志中的所有任务
; <code>RefreshInitialSpawnPositions</code>
: {{todo|似乎将幸存者传送到他们生成的位置。}}


== Outputs ==
== 输出 ==
==={{l4d}} Original outputs===
==={{l4d}} 原始输出===
; <code>OnGameplayStart</code>
; <code>OnGameplayStart</code>
: Fired when a map loads, all players join and gameplay begins.
: 当地图加载后,所有玩家加入并开始游戏时触发。
; <code>OnPanicEventFinished</code>
; <code>OnPanicEventFinished</code>
: Fired when a panic event is finished.
: 当恐慌事件完成时触发。
{{O Targetname}}
{{O Targetname:zh-cn}}


==={{l4d2}} Additional outputs===
==={{l4d2}} 额外输出===
The following are additional outputs only available in L4D2. They focus on the new scavenge game mode and vscripts.
以下是仅在 L4D2 中可用的附加输出。他们专注于新的清道夫模式和 vscripts。
; <code>OnCustomPanicStageFinished</code>
; <code>OnCustomPanicStageFinished</code>
: Fired when each stage of a custom panic event or custom finale finishes. Relies on vscripts.
: 当自定义恐慌事件或自定义结局的每个阶段结束时触发。依赖于 vscripts。
; <code>OnTeamScored</code>
; <code>OnTeamScored</code>
: Fired when a team places a scavenge item in the scavenge goal.
: 当一个团队在清道夫加油口中放置清道夫物品时触发。
; <code>OnScavengeRoundStart</code>
; <code>OnScavengeRoundStart</code>
: Fired when a scavenge round starts.
: 当清道夫回合开始时触发。
; <code>OnScavengeOvertimeStart</code>
; <code>OnScavengeOvertimeStart</code>
: Timer has run out and game went into overtime.
: 计时器时间到,游戏进入超时赛时触发。
; <code>OnScavengeOvertimeCancel</code>
; <code>OnScavengeOvertimeCancel</code>
: Time was added to the clock, ending overtime.
: 时间被添加到计时器,结束超时赛。
; <code>OnScavengeTimerExpired</code>
; <code>OnScavengeTimerExpired</code>
: Time has run out, game did not enter overtime.
: 时间到了,比赛没有进入超时赛。
; <code>OnScavengeIntensityChanged <[[int]]></code>
; <code>OnScavengeIntensityChanged <{{L|int}}></code>
: Intensity level has changed. 1 = highest intensity, decreases as number gets larger.
: 当紧张等级被更改时触发。 1 = 最高强度,随着数字变大而降低。
; <code>OnUserDefinedScriptEvent1-4</code>
; <code>OnUserDefinedScriptEvent1-4</code>
: Generic user defined event fired from a squirrel [[L4D2 Vscripts|script]] (<code>UserDefinedEvent1()-UserDefinedEvent4()</code>)
: 从 Squirrel {{L|L4D2 Vscripts|Script}} 触发的通用用户定义事件 (<code>UserDefinedEvent1()-UserDefinedEvent4()</code>)


== See also ==
== 另请参阅 ==
* [[info_survivor_position]]
* {{L|info_survivor_position}}
* [[L4D Level Design/Panic Events]]
* {{L|L4D关卡制作/恐慌事件}}
* [[L4D2 Vscripts|L4D2 vscripts]]
* {{L|L4D2 Vscripts}}
* [[logic_director_query]]
* {{L|L4D2_Director_Scripts|导演脚本}}
* [[trigger_finale]]
* {{L|logic_director_query}}
* {{L|trigger_finale}}

Latest revision as of 07:32, 12 July 2024

English (en)中文 (zh)Translate (Translate)

info_director是一个点实体(en),可在求生之路系列求生之路系列 求生之路系列中使用。

它是臭名昭著的 AI 导演,必须存在于每个求生之路和求生之路2(en)地图中才能正常游戏。

导演几乎完全自动化,仅在设计时存在于其他设计师放置的实体需要与其进行通信的少数情况下,例如在战役开场动画开始时强迫幸存者到他们各自的 info_survivor_position(en)

logic_director_query(en)(存在于自 求生之路2 以来)可以输出导演的愤怒等级,让关卡设计师可以根据玩家的表现来调整条件。

强制至幸存者位置

如果幸存者设置了幸存者名称,导演可以强制所有幸存者站在 info_survivor_position(en) 处。
这用于战役开始时,以防止幸存者在地图下方生成,或在结局中将幸存者传送出地图以暗示他们在逃离载具内。

为此,请转到 info_director 输出并添加以下输出:

  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnGameplayStart !self ForceSurvivorPositions <none> 0.00 No
Io11.png OnGameplayStart !self ReleaseSurvivorPositions <none> 0.20 No

注意事项

  • 使用 changelevel(en) 控制台命令重新启动地图将导致导演忽略forcesurvivorpositions输入。
如果你在使用changelevel重新编译后重新启动地图并且你需要测试你的开场动画,请在之后使用kill控制台命令使任务失败,这将导致地图以重新启动的方式允许 info_director 使用forcesurvivorpositions输入,这也将允许你的相机运行。
  • logic_auto(en) 不能触发forcesurvivorpositions除非地图是从游戏菜单中作为战役新加载的,或者在任务失败后重新启动。
为了解决这个问题,让导演使用ongamestart输入对自己调用forcesurvivorpositionsreleasesurvivorpositions。当你的战役准备好发布时,如果你仍然想这样做,你可以在最终编译之前安全地将其改回使用 logic_auto,因为玩家将从游戏菜单加载你的战役。

键值

Name (目标名称) <target_source>[ Edit ]
这个名称是其他实体通过 输入/输出(en) 或其他 关键值(en)(如 parentnametarget) 来引用该实体时使用的标识符。
该名称也会显示在 Hammer 编辑器的 2D 视图和 实体报告(en) 中。
参见:  所有实体均可使用的 通用键值、输入与输出(en)

Origin(en) (X Y Z) (origin) ([todo internal name (i)]) <coordinates(en)>
实体处于世界中的位置,旋转实体会以实体坐标原点旋转。

输入

求生之路 原始输入

PanicEvent
当地图发生某些你认为重要的事情时,应该让导演知道。
PanicEventControlled <int(en)>
类似于恐慌事件,但允许通过波的数量对强度进行一些控制。早期地图的标准值为 1,后期地图为 2。
Note.png注意:PanicEventControlled 仅适用于 L4D1。在 L4D2 中,运行导演脚本(en)会触发一系列恐慌事件(以及更多!)。
ForceSurvivorPositions
让每个幸存者站在一个 info_survivor_position。
Note.png注意:还隐藏 HUD,除了生还者模式和清道夫模式特定的 HUD。
ReleaseSurvivorPositions
让幸存者再次自由行动。
Note.png注意:还可以再次启用 HUD。
FireConceptToAny <string(en)>
向任何能够说出它的幸存者触发一个演讲概念。允许由地图实体触发幸存者对话(例如,带有参数 hospital04_path4 的毫不留情的电梯)
StartIntro
开场动画开始时触发。玩家在此(输出)激活时免疫伤害。不会产生丧尸或特殊感染者。
FinishIntro
开场动画结束时触发。玩家现在会受到伤害。鉴于玩家不再站在标记为 PLAYER_START 和/或 CHECKPOINT 的导航方块中,丧尸和特殊感染者可以生成。
EnableTankFrustration
可用于启用Tank玩家在太长时间没有伤害幸存者时得到的超时(Tank 可以气死)。
DisableTankFrustration
可用于禁用Tank玩家在太长时间没有伤害幸存者时得到的超时(Tank 不能气死)。

Template:I Targetname:zh-cn

求生之路2 额外输入

以下是仅在 L4D2 中可用的额外输入。

BeginScript <string(en)>
EndScript
Squirrel开始/结束一个导演脚本(en)。"BeginScript" 将自动结束任何正在运行的脚本,以启动另一个脚本。
ScriptedPanicEvent
Squirrel运行一个脚本化的恐慌事件,类似于大结局的阶段事件。
ForcePanicEvent
触发恐慌事件,无论发生什么。
EndCustomScriptedStage
Squirrel结束脚本化的结局阶段。
IncrementTeamScore <int(en)>
增加一个团队的分数。(2=survivors, 3=infected)
CreateNewJournal <string(en)>
创建一个新日志。
WriteToJournal <string(en)>
将任务写入到 I/O 日志。
ExecuteJournal <string(en)>
执行指定日志中的所有任务
RefreshInitialSpawnPositions
待完善: 似乎将幸存者传送到他们生成的位置。

输出

求生之路 原始输出

OnGameplayStart
当地图加载后,所有玩家加入并开始游戏时触发。
OnPanicEventFinished
当恐慌事件完成时触发。

实体目标名:

OnUser1 to OnUser4
这些输出将分别响应于FireUser1FireUser4 输入。 详见 User Inputs and Outputs
OnKilled  (存在于 求生之路系列求生之路系列 之中)
当实体被删除时触发此输出。

求生之路2 额外输出

以下是仅在 L4D2 中可用的附加输出。他们专注于新的清道夫模式和 vscripts。

OnCustomPanicStageFinished
当自定义恐慌事件或自定义结局的每个阶段结束时触发。依赖于 vscripts。
OnTeamScored
当一个团队在清道夫加油口中放置清道夫物品时触发。
OnScavengeRoundStart
当清道夫回合开始时触发。
OnScavengeOvertimeStart
计时器时间到,游戏进入超时赛时触发。
OnScavengeOvertimeCancel
时间被添加到计时器,结束超时赛。
OnScavengeTimerExpired
时间到了,比赛没有进入超时赛。
OnScavengeIntensityChanged <int(en)>
当紧张等级被更改时触发。 1 = 最高强度,随着数字变大而降低。
OnUserDefinedScriptEvent1-4
从 Squirrel Script(en) 触发的通用用户定义事件 (UserDefinedEvent1()-UserDefinedEvent4())

另请参阅