Zh/Generic Keyvalues, Inputs and Outputs/Inputs
Jump to navigation
Jump to search
输入
- AddOutput <字符串>
- 为实体添加新的键值/输出。某些键值需要额外代码支持,仅通过此输入修改可能无效。
格式:<键名> <值>
格式:<输出名称> <目标实体>:<输入名称>:<参数>:<延迟>:<最大触发次数(-1表示无限)>
- Kill
- 从场景中移除该实体及其所有子实体。
- FireUser1 to FireUser4 <字符串>
- 触发对应的
OnUser输出;参见用户输入与输出。
警告:此输入会接收但不处理字符串参数。若从可能发送值的输出触发此输入会导致问题,请确保指定虚拟字符串参数,否则控制台会报"错误的输入/输出链接"错误。
父子关系
- SetParent <目标名>
- 支持!activator但不支持!caller
使实体跟随目标实体移动。参见实体层级(父子关系)。
- SetParentAttachmentMaintainOffset <字符串>
- 功能同上,但保持当前位置偏移。
- ClearParent
- 将实体从移动层级中移除,使其可独立移动。
- KillHierarchy
- 功能与
Kill相同,但会同时移除所有子实体,执行效率略高。
VScript
- RunScriptCode <字符串> (存在于自
以来) (也存在于
之中) - 在接收实体的作用域中执行VScript代码。可使用
activator、caller、self变量(同RunScriptFile)。
警告:在Hammer对象属性对话框的任何文本字段中使用引号符号"会导致VMF文件损坏,必须通过文本编辑器直接编辑VMF文件并删除额外添加的引号符号才能修复。
提示:在
中反引号`会被转为引号"。如需字符串建议使用RunScriptFile或实体脚本。
错误:在无脚本作用域的实体上使用此输入访问activator或caller会导致错误。
军团要塞2分支已修复此问题。
- TerminateScriptScope (仅存在于
之中) 不存在于FGD! - 销毁接收实体的脚本作用域。
上下文
- ClearContext
- 清除实体的所有上下文。
警告:除非调试需要,否则不建议使用此输入,特别是对玩家实体,可能清除VScript模块存储的重要数据。
- RemoveContext <字符串>
- 移除指定的上下文。
渲染
RenderFields:
- Alpha <整数 0-255 >
- Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its
rendermodeset to a number other than0.
- Color <color255>
- Sets an RGB color for the entity.
Shadow:
- DisableShadow
- Turn dynamic shadows off for this entity. Identical to applying EF_NOSHADOW.
- EnableShadow
- Turn dynamic shadows on for this entity.
- DisableReceivingFlashlight (存在于自
以来) - This object will not receive light or shadows from projected textures.
- EnableReceivingFlashlight (存在于自
以来) - This object may receive light or shadows from projected textures.
其他
|