Zh/Prop portal: Difference between revisions
< Zh
Jump to navigation
Jump to search
(Created page with "{{LanguageBar|CProp_Portal}} {{this is a|模型实体|name=prop_portal|series=Portal}} ==实体描述== 代表传送门的实体,与{{L|weapon_portalgun}}发射的传送门完全一致。 {{note|若要使prop_portal与玩家传送枪关联,必须将传送门配对ID设为0。}} {{warning|通过{{code|Kill}}等方式删除传送门可能导致游戏崩溃,应使用{{code|Fizzle}}或{{code|SetActivatedState 0}}: :{{note|区别在于:{{code|Fizzle}}会播放音...") |
(→实体描述) |
||
Line 8: | Line 8: | ||
:{{note|区别在于:{{code|Fizzle}}会播放音效并移除传送门,而{{code|SetActivatedState 0}}会静默关闭传送门但不移除。若后续有相同配对ID和颜色的传送门激活,静默关闭的传送门会被移除。 | :{{note|区别在于:{{code|Fizzle}}会播放音效并移除传送门,而{{code|SetActivatedState 0}}会静默关闭传送门但不移除。若后续有相同配对ID和颜色的传送门激活,静默关闭的传送门会被移除。 | ||
::{{tip|此特性适用于在激活新传送门前静默清除地图中的固定传送门。}} | ::{{tip|此特性适用于在激活新传送门前静默清除地图中的固定传送门。}} | ||
}}} | }}}} | ||
{{warning|当存在未链接的激活传送门时,激活同配对ID同颜色的新传送门会导致先激活的传送门变色。可通过先禁用旧传送门避免此问题。}} | {{warning|当存在未链接的激活传送门时,激活同配对ID同颜色的新传送门会导致先激活的传送门变色。可通过先禁用旧传送门避免此问题。}} | ||
{{bug|在{{ | {{bug|在{{Gmod|4}}中使用传送门时,穿越传送门会出现碰撞异常(如卡入地板)。}} | ||
===《Portal 2》放置规则=== | ===《Portal 2》放置规则=== |
Latest revision as of 06:31, 3 July 2025
prop_portal
是一个模型实体,可在 传送门(系列)中使用。
实体描述
代表传送门的实体,与weapon_portalgun 发射的传送门完全一致。


注意:区别在于:Fizzle会播放音效并移除传送门,而SetActivatedState 0会静默关闭传送门但不移除。若后续有相同配对ID和颜色的传送门激活,静默关闭的传送门会被移除。
提示:此特性适用于在激活新传送门前静默清除地图中的固定传送门。



《Portal 2》放置规则

- 必须非激活状态启动
- 必须与放置表面完全平行(使用2D视图黄线和3D视图蓝线作为参考)
- 与目标表面的距离必须为0-8单位
- 实体中心与上下相邻表面的距离≥57单位,与左右相邻表面≥32单位
- 表面材质必须允许放置传送门(即不含%noportal 1参数)

键值
- Start Activated (Activated) <布尔值 >
- 是否初始激活
错误:
此设置会导致传送门出现在世界原点,建议改用logic_auto [todo tested in ?]
错误:
此设置会导致玩家无法正常走出配对传送门,必须跳跃通过 [todo tested in ?]
- Portal Number (PortalTwo) <choices>
- 传送门颜色选择
- 0 : 蓝色传送门
- 1 : 橙色传送门
- Half-Width of the Portal. (HalfWidth) <浮点型 > (存在于自
以来)
- 传送门宽度的一半(默认为32)
- Half-Height of the Portal. (HalfHeight) <浮点型 > (存在于自
以来)
- 传送门高度的一半(默认为54)
- Portal pair ID that it belongs to (LinkageGroupID) <整数 >
- 传送门配对ID(0-255)
- Name (目标名称) <target_source>[ Edit ]
- 这个名称是其他实体通过 输入/输出 或其他 关键值 (如
parentname
或target
) 来引用该实体时使用的标识符。
该名称也会显示在 Hammer 编辑器的 2D 视图和 实体报告 中。参见: 所有实体均可使用的 通用键值、输入与输出
- Pitch Yaw Roll (Y Z X) (angles) <QAngle >
- This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
输入
- SetName <字符串 >
- 设置实体名称(FGD注释:命名传送门很有趣)
- SetActivatedState <布尔值 >
- 设置激活状态
- Fizzle
- 播放消散效果并移除
- NewLocation <字符串 >
- 设置新坐标和角度(格式:'x y z pitch yaw roll')
- Resize <字符串 > (存在于自
以来)
- 调整尺寸(注意:仅相同尺寸的传送门可正常运作)
- SetLinkageGroupID <整数 > (存在于自
以来)
- 设置配对ID
输出
- OnPlacedSuccessfully
- !activator = weapon_portalgun
!caller = this entity
当传送门成功放置时触发