传送门教程-自动传送门
< Zh
Jump to navigation
Jump to search
本指南将向您展示如何创建自动传送门。
固定式传送门
框架
创建一个prop_static实体并将其模型设定为 models/props/autoportal_frame/autoportal_frame.mdl
传送门
创建一个prop_portal实体并输入以下属性:
| Property Name | Value |
|---|---|
| Name | portal |
| Start Activated | Inactive |
| Portal Number | Portal Number Here |
将两个prop_portal放在门框底部上方。现在,使用“顶部(x/y)视图”,根据传送门框架的“条形图”将其居中。
传送门开启音效
创建一个ambient_generic实体并输入下列:
| Property Name | Value |
|---|---|
| Name | sound_portal_spawn
|
| Sound Name | Portal.open_blue or Portal.open_red
|
| Max Audible Distance | 333 |
| Source Entity Name | portal
|
转到标志并修改以下内容:
| Flag | ||||
| Start Silent | ||||
传送门开启震动
创建一个env_shake实体然后命名 shake_portal_spawn.
如果玩家需要靠近传送门,则将此实体放在玩家触发它的位置附近。
可选(推荐)
如果你想让事情变得更简单些,按以下步骤操作
创建一个logic_relay并将其命名为relay_portal_spawn
添加输出:
实现
让传送门生成
让某个实体触发relay_portal_spawn
例如trigger_once:
| My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
|---|---|---|---|---|---|---|
| OnTrigger | relay_portal_spawn | Trigger | 0.00 | No |
关闭传送门
若要使传送门关闭,请将活动状态设置为0,
下面是示例trigger_once:
| My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
|---|---|---|---|---|---|---|
| OnTrigger | portal | SetActivatedState | 0 | 0.00 | No |