momentary_rot_button
< Zh
本简体中文页面由大康翻译于2021年8月8日,最后更新于2021年10月1日。部分内容由机器翻译。
momentary_rot_button
是一个固体实体 ,可在所有的 起源 游戏中使用。它被设计用于旋转轮子,玩家可以在停止之前将它们旋转到任意位置。
错误:如果
按钮将向后转动,直到到达起始位置。此时按钮将看起来像是停止转动,但仍可以使用(按住)它,直到
Toggle (Disable Auto Return)
选项为 enabled (启用)并且暂停使用,则该按钮将在下次使用时开始向后转动。它仍然会像往常一样触发“OnPressed”输出,但只是以另一种方式旋转。按钮将向后转动,直到到达起始位置。此时按钮将看起来像是停止转动,但仍可以使用(按住)它,直到
OnReachedPosition
输出触发。解决方案:禁用
[todo tested in?]Toggle (Disable Auto Return)
选项并将Auto-return speed
设置为 0.000000000000000000000000000001.
这样,从技术上讲,它确实会自行向后转,但它似乎静止不动。允许按钮在再次使用时继续向前转动。键值
- Name
(targetname)
<string > - 其他实体引用该实体的目标名称。
- Speed (deg/sec)
(speed)
<integer > - 车轮每秒转动的量(以度为单位)。
- Master (Obsolete)
(master)
<string > - 旧版支持:主实体的名称。如果未激活主实体,则无法使用此按钮。
- Sounds
(sounds)
<choices> - 转动后播放声音。
值 描述 0
无 1
大电击和 Warmup 2
拒绝访问 3
允许访问 4
快速组合锁(Quick Combolock) 5
电源死锁(Power Deadbolt) 1 6
电源死锁 2 7
柱塞(Plunger) 8
小电击 9
钥匙卡声音 21
吱吱作响(Squeaky) 22
吱吱作响的气动(Squeaky Pneumatic) 23
棘轮呻吟(Ratchet Groan) 24
清洁棘轮(Clean Ratchet) 25
煤气罐
- Distance
([todo internal name (i)])
<integer > - 允许轮子旋转的最大量(以度为单位)。
- Auto-return speed
([todo internal name (i)])
<integer > - 如果“Toggle”生成选项未设置,则轮子在单独放置时自动返回的速度,以度/秒为单位。
- Minimum Light Level
([todo internal name (i)])
<string > - 击中此画笔的最低环境光级别。
- Start Position
([todo internal name (i)])
<float > - 生成时的位置。该值介于 0.0 和 1.0 之间,其中 0 是未旋转位置,1 是旋转位置 +“距离”。
- Start Direction
([todo internal name (i)])
<choices> - 车轮朝哪个方向转动。
- -1 : 向前
- 1 : 向后
Parentname:
- Parent
(parentname)
<targetname > - Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
- Origin (X Y Z) (origin)
([todo internal name (i)])
<coordinates > - 实体处于世界中的位置,旋转实体会以实体坐标原点旋转。
- Pitch Yaw Roll (Y Z X)
(angles)
<angle > - 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.
RenderFields:
- 渲染模式
(rendermode)
<choices> - 在此实体上设置非标准渲染模式。
- Render FX
(renderfx)
<choices> - 各种有点遗留的阿尔法效果。请参见渲染效果
- Render Amount / Transparency (0 - 255)
(renderamt)
<integer > - Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
- Render Color (R G B)
(rendercolor)
<color255 > - Color tint.
- Disable Receiving Shadows
(disablereceiveshadows)
<boolean > - Prevent the entity from receiving shadows on itself.
选项
- [
1
] : Not Solid | 非固体 - [
32
] : Toggle (Disable Auto Return) | 切换(禁用自动返回) - [
64
] : X Axis | X 轴 - [
128
] : Y Axis | Y 轴 - [
1024
] : Use Activates | 使用激活 - [
2048
] : Starts locked | 开始时锁定 - [
8192
] : Jiggle when used while locked | 锁定后当使用时抖动 - [
16384
] : Non-Solid | 非固体注意:没有任何效果!(仅存在于 之中)
输入
Lock
- 锁定按钮,防止其发挥作用。
Unlock
- 解锁按钮,使其发挥作用。
SetPosition
<string >- 移动到一个位置。该参数必须是介于 0 和 1 之间的值,其中 0 是未旋转的位置,1 是旋转的位置 + “距离”。
SetPositionImmediately
<string >- 立即传送到一个位置。该参数必须是介于 0 和 1 之间的值,其中 0 是未旋转的位置,1 是旋转的位置 + “距离”。
_DisableUpdateTarget
- 防止位置输出触发。用于通过触发
SetPosition
输入来实现“锁定时抖动”。
_EnableUpdateTarget
- 允许位置输出再次触发。用于通过触发
SetPosition
输入来实现“锁定时抖动”。
Kill
- 从这个世界中删除此实体。
KillHierarchy
- 功能类似于
Kill
,尽管此实体与其父实体都被删除了,但比Kill
快一点。
AddOutput
<string >- 在此实体上分配新的键值/输出。对于键值,有些依赖于额外的必要代码来运行,如果它只是通过这个输入改变就行不通。必须遵循严格的格式:
语法:
// 更改键值的格式: "AddOutput [键] [值]"
//// 原始文本:
"OnUser1" "!self,AddOutput,targetname new_name"
// 添加输出的格式: "AddOutput {目标名称}:{输入名称}:{参数}:{延迟}:{最大触发次数,-1 代表无限}"
//// 原始文本:
"OnUser1" "!self:SetParent:!activator:0.0:-1"
// 参数可以留空,但仍应包含空的空白。
//// 原始文本:
"OnUser1" "!self:ClearParent::0.0:-1"
FireUser1
toFireUser4
- 触发
OnUser
输出; 详见 User Inputs and Outputs。
RunScriptCode
<string > (存在于自 以来)- (执行脚本代码。)执行一段接收实体域的脚本源代码。通过控制台触发,可能需要英文双引号。错误:在中,该代码是触发输出的实体的脚本域中执行, 非 接受输入的实体。 [todo tested in?]警告:切勿在此输入的元素内使用字符串!它将破坏VMF ,由嵌套引号引起!你必须用文本编辑器手动删除来修复!
SetLocalOrigin
<coordinates > (存在于自 以来) 不存在于FGD!- 将此实体设置到地图上某点。如果此实体是某实体父级,那么它的子级也会随着偏移。
Parentname:
SetParent
<string >- Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment
<string >- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset
<string >- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
RenderFields:
Alpha
<integer 0–255>- Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its
rendermode
set to a number other than0
.
Color
<color255 >- Sets an RGB color for the entity.
输出
Position
<integer >- 每当按钮移动时触发。输出是按钮从 0 到 1 的位置,其中 0 是未旋转的位置,1 是旋转的位置 +“距离”。
OnPressed
<integer >- 第一次按下按钮时触发。
OnUnpressed
<integer >- 当按钮第一次被释放时触发。
OnFullyClosed
- 当按钮到达位置 1,旋转位置 +“距离”时触发。
OnFullyOpen
- 当按钮到达位置 0 时触发,即未旋转的起始位置。
OnReachedPosition
- 每当按钮到达目标位置时触发:即当它打开、关闭或到达
“SetPosition”
输入指定的点时。
Targetname:
OnUser1
toOnUser4
- These outputs each fire in response to the firing of the like-numbered
FireUser1
toFireUser4
Input; see User Inputs and Outputs.