ent_fire
< Zh
		
		
		
		Jump to navigation
		Jump to search
		ent_fire是一个控制台命令,可在所有的  起源 游戏中使用。
该命令用于触发实体的输入,是程序员和地图制作者调试实体逻辑的核心工具。
 起源 游戏中使用。
该命令用于触发实体的输入,是程序员和地图制作者调试实体逻辑的核心工具。
 警告:多人游戏中仅服务器/监听服务器主机可使用ent_fire
警告:多人游戏中仅服务器/监听服务器主机可使用ent_fire 注意:在tf2等游戏中需改用
注意:在tf2等游戏中需改用script EntFire()命令:
 示例:
示例:script EntFire("player", "SetHealth", "1", 5.0)使用方法
ent_fire <类名/目标名/通配符> <输入名> <参数> <延迟>
- 对匹配的实体触发指定输入
- 可覆盖参数和延迟时间(秒)
- 未指定输入时默认触发Use输入
 提示:控制台输入时会自动补全目标名和输入名
提示:控制台输入时会自动补全目标名和输入名 注意:The targetname/classname parameter supports wildcard but anything after the wildcard is ignored. For example,
注意:The targetname/classname parameter supports wildcard but anything after the wildcard is ignored. For example, ent_fire zapperpod*_train kill will kill any 实体 whose targetname/classname starts with zapperpod no matter what text follows after wildcard.
{{bug|hidetested=1|延迟参数仅支持整数(小数部分会被忽略)
 解决方案:通过AddOutput设置延迟:
解决方案:通过AddOutput设置延迟:
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
- 删除准星指向的实体
 警告:对玩家或worldspawn使用会导致崩溃
警告:对玩家或worldspawn使用会导致崩溃ent_fire counter_* Add 1
- 为所有math_counter加1
ent_fire player IgniteLifeTime 5
- 点燃玩家5秒(需作弊模式)
ent_fire box addoutput "targetname crate"
- 修改实体名称


























