prop_portal
< Zh(Redirected from Zh/Portals)
Jump to navigation
Jump to search
prop_portal是一个模型实体,可在
传送门(系列)中使用。
实体描述
代表传送门的实体,与weapon_portalgun发射的传送门完全一致。
Kill等方式删除传送门可能导致游戏崩溃,应使用Fizzle或SetActivatedState 0:
注意:区别在于: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
当传送门成功放置时触发