求生之路2关卡设计/提示信息

来自Valve Developer Community
跳转至: 导航搜索
English (en)Русский (ru)中文 (zh)
编辑

本简体中文界面由大康翻译。部分内容由机器翻译。(早期翻译作品可能不太好,请见谅)


尽管您应该努力通过使用照明和地图设计来使玩家知道目标,但您常常会发现在屏幕上提供进度信息会很有帮助。如果您需要自定义活动或想要将其告知玩家的意外事件,则尤其如此。《求生之路》求生之路中使用的提示则是固定的,但《求生之路2》求生之路2中则允许创建您自己的提示。有两种方法可以将提示添加到您的地图中:您可以使用 info_game_event_proxy 插入现有提示,也可以使用 env_instructor_hint 创建自定义提示。

使用预定义的提示

该图显示了已设置的 info_game_event_proxy 实体属性。

要使用求生之路2中已经存在的提示,请将 info_game_event_proxy 放入您要显示提示的关卡中。要选择您想要显示的提示,请将提示名称复制到“要生成的事件的名称”(Name of the event to generate)框中,并将“范围”(Range)更改为所需的值。如果要在玩家看到它时触发它,则需要转到Flags选项卡,然后选中“首次看到时自动启用”(Fire Automatically When First Seen
你可以在此处查看所有可用的预定义提示。求生之路2提示信息列表
范例:

Name of the event to generate: L4D2_Instructor_explain_perimeter1
Range: 500

创建一个自定义提示

这两个必须的实体。

首先,放置一个新的实体 env_instructor_hint。这使您可以控制和指定提示参数。
此外,提示还需要在地图中显示3D位置并控制可见性。我们可以通过创建要指向的客户端实体来做到这一点。完成此操作的最简单方法是放置一个命名的 info_target 实体,并启用"transmit to client (respect PVS)"选项。选择 info_target 时,可以在属性对话框的“Flags”选项卡下找到它。将 info_target 设置为 env_instructor_hint 的目标实体后,您应该会在游戏中看到提示。

您指定的字幕文本现在应该在游戏中显示给玩家。

另请参阅


While you should strive to make player goals clear through the use of lighting and map design, you will often find that it is helpful to provide progression information on screen. This is particularly true if you require a custom activity or have an unexpected event that you'd like to inform your players about. The convention in Left 4 Dead is to use an instructor hint, and Left 4 Dead 2 allows you to create your own. There are two ways to add an instructor hint into your level, either using an info_game_event_proxy which you can use to insert existing hints, or by creating a custom hint using env_instructor_hint

Using a predefined hint

Image showing a fully set up game event proxy.

To use a hint already in L4D2, place an info_game_event_proxy into your level where you'd like the hint to appear. To choose the hint that you'd like to appear copy the hint name into the "Name of the event to generate" box, and change the "Range" to one that you'd like. If you want this to trigger upon the player seeing it you will need to go to the Flags tab and check "Fire Automatically When First Seen".

You can view all the available instructor hints here: List of L4D2 Instructor Messages


Example:
Name of the event to generate: L4D2_Instructor_explain_perimeter1
Range: 500

Note.png注意:The upside of using predefined hints is that the hint will be translated to any language the game is running on.
The downside is that setting them up is tedious because nowhere in Hammer does it say what messages are available and what their texts would read. Meaning you'll have to check the List of L4D2 Instructor Messages page every time you use it.

Creating a custom hint

The two required entities.

First, place a new entity of class env_instructor_hint. This allows you to control and specify the hint parameters.

Additionally, the hint will also need a 3D location in your map to appear and to control visibility. We can do this by creating a client-side entity to point to. The easiest way to accomplish this is to place a named info_target entity and enabling the "transmit to client" (respect PVS) flag. This can be found under the Flags tab of the properties dialog when the info_target is selected. Once you assign the info_target as the Target Entity of the env_instructor_hint, you should see your hint in game.

The caption text that you specify should now appear to players in game.

Triggering Hint

If a hint should not be visible immediately upon being in its radius, you'll want to trigger them manually via the press of a button, a trigger, or a timed event.
env_instructor_hint has a ShowHint Input, but unfortunately that is bugged and will only show the hint to the !activator, which will be whoever pressed the button to show it.
Instead, you'll need to add a point_template to spawn the env_instructor_hint which has Show On First Sight set.

See also