传送门

From Valve Developer Community
< Zh
Revision as of 07:05, 16 January 2022 by Xhiswise (talk | contribs)
Jump to navigation Jump to search
English (en)한국어 (ko)Português (pt)Русский (ru)中文 (zh)Translate (Translate)

传送门能通过标准的起源实体制作。

Note.png注意:若你想要重设玩家速度, 使用这个 vscript 指令
OnBlah > !activator > RunScriptCode > self.SetVelocity(Vector(0,0,0))

单向传送门

开始创建一个 固体(brushes) 并用 纹理工具(tools/toolstrigger) 添加纹理。 现在选择固体通过 CTRL + T 或者右键固体并选中 转换成实体(Tie To Entity), 然后选择 trigger_teleport 然后点击应用(apply). 这将会是玩家要被传送必须进入的区域 (参见右图).

  • Set the 'Remote Destination' to an appropriate name (teleport_destination_1, for example).
  • Change to the 'Flags' tab and check the 'Clients' flag to allow players to teleport.

接着, 从 实体 列表之中制作一个 info_teleport_destination 在你想要作为传送 出口 的地方. 这将会是玩家想要传送去的点.

  • Set the 'Name' attribute to the appropriate name that was used in the previous step (teleport_destination_1).
Note.png注意:请将这个放在高于表面几个单位处。因为有些原因, 若是将实体对齐表面,玩家将会被 "卡住" 。 传送之后高出的几个单位几乎没有明显的下落。

现在游戏中, 当你触碰 trigger_teleport, 你将会从 info_teleport_destination 送出来.

双向传送门

An example of a two-way teleportation.

制作一个双向传送门和制作单向传送门的办法差不多, 如果你能成功做出其中一个, 那剩余的便是手到擒来。

首先, 创建两个 固体(brushes) 来作为你的传送门入口, 然后用 纹理工具(tools/toolstrigger) 添加纹理。 现在, 和单向传送门一样, 按下 CTRL + T 或者右键并选择 转换成实体(Tie To Entity) 然后给它们全部选择 trigger_teleport

  • Set the keyvalues and flags the same as a one-way teleporter, except for Remote Destination.
  • Set the Remote destination keyvalue of one teleport entrance to an appropriate name (teleport_destination_1, for example) and the other entrance, to another name such as teleport_destination_2.
  • Name these brush entities something appropriate, like teleport_entrance_1 and teleport_entrance_2.


现在创建两个 info_teleport_destination 实体, 这些会是你想传送去的地方。

  • Set the Name of each of them to the appropriate names thought up earlier (teleport_destination_1 and teleport_destination_2, for example).
  • Place the one teleport destination near to the entrance that does not teleport to it.
  • Place the other teleport destination near to the other teleport entrance.
Note.png注意:This means teleport_destination_1 would be next to teleport_entrance_2, and teleport_destination_2 would be next to teleport_entrance_1
Warning.png警告:Make sure that no part of any info_teleport_destination entity is touching the trigger_teleport brush it is next to. If this happens, whenever you teleport, it will either fling you back through the other teleport or cause an infinite loop where you are repeatedly teleporting between the 2 destinations.
Note.png注意:The names of these entities are not significant, but it makes it easier to understand.


现在当你踏入 teleport_entrance_1 你将会被传送去 teleport_destination_1 ,然后对于 teleport_entrance_2teleport_destination_2也一样。


制作团队专用传送器

Note.png注意:这部分仅仅应用在 军团要塞2 Team Fortress 2 之中。

If you have teleporters in your map that are out in the open, and you want to make them team-specific, add 1 filter_activator_tfteam per teleporter that you are making team-specific.


Note.png注意:You can also use other filter entities that apply to objects being teleported (filter_activator_mass_greater, for example).

外部链接