Zh/Ent fire: Difference between revisions
< Zh
Jump to navigation
Jump to search
(Created page with "{{LanguageBar|ent_fire|title=ent_fire命令}} {{This is a|控制台命令|name=ent_fire}} 该命令用于触发实体的{{L|Inputs and Outputs|输入}},是程序员和地图制作者调试实体逻辑的核心工具。 {{warning|多人游戏中仅服务器/监听服务器主机可使用ent_fire}} {{note|在{{L|tf2}}等游戏中需改用{{code|script EntFire()}}命令: {{example|{{code|script EntFire("player", "SetHealth", "1", 5.0)}}}} == 使用方法 == {{pre|ent_...") |
No edit summary |
||
Line 5: | Line 5: | ||
{{warning|多人游戏中仅服务器/监听服务器主机可使用ent_fire}} | {{warning|多人游戏中仅服务器/监听服务器主机可使用ent_fire}} | ||
{{note|在{{L|tf2}}等游戏中需改用{{code|script EntFire()}}命令: | {{note|在{{L|tf2}}等游戏中需改用{{code|script EntFire()}}命令: | ||
{{example|{{code|script EntFire("player", "SetHealth", "1", 5.0)}}}} | {{example|{{code|script EntFire("player", "SetHealth", "1", 5.0)}}}}}} | ||
== 使用方法 == | == 使用方法 == |
Latest revision as of 00:11, 27 June 2025
ent_fire
是一个控制台命令,可在所有的 起源 游戏中使用。
该命令用于触发实体的输入 ,是程序员和地图制作者调试实体逻辑的核心工具。



使用方法
ent_fire <类名/目标名/通配符> <输入名> <参数> <延迟>
- 对匹配的实体触发指定输入
- 可覆盖参数和延迟时间(秒)
- 未指定输入时默认触发Use输入


{{bug|hidetested=1|延迟参数仅支持整数(小数部分会被忽略)

ent_fire crab AddOutput "OnUser1 !self:Unburrow::0:1" ent_fire crab FireUser1
示例
ent_fire relay_start_assault Trigger
- 触发所有logic_relay 实体
ent_fire npc_barney SetHealth 5
- 设置NPC生命值为5
ent_fire !picker Kill
- 删除准星指向的实体

ent_fire counter_* Add 1
- 为所有math_counter 加1
ent_fire player IgniteLifeTime 5
- 点燃玩家5秒(需作弊模式)
ent_fire box addoutput "targetname crate"
- 修改实体名称