This article's documentation is for anything that uses the Source engine. Click here for more information.

Firetarget: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(formatting)
 
Line 1: Line 1:
{{This is a|name=firetarget|console command}} This command calls an entity's [[Use]] function with use type <code>USE_TOGGLE</code>. It represents the way GoldSrc entities communicate.  
{{This is a|name=firetarget|console command}} This command calls an entity's [[Use]] function with use type {{mono|USE_TOGGLE}}. It represents the way {{goldsrc|4}} entities communicate.  


=== Syntax ===
=== Syntax ===
Syntax: <code>firetarget <targetname or classname></code>
Syntax: {{code|preset=2|firetarget <[[target name or class|targetname or classname]]>}}


Not providing an argument is equivalent to [[!picker]]. <code>!activator / !caller / !self</code> target the player issuing the command.
Not providing an argument is equivalent to [[!picker]]. {{code|preset=1|!activator / !caller / !self}} target the player issuing the command.




=== Examples ===
=== Examples ===


<code>firetarget env_sprite</code> - toggles [[env_sprite]]s on/off as they have left-over use function which is officially still used in certain {{hls|2}} maps and targetted by {{ent|multi_manager}}.
{{code|preset=2|firetarget [[env_sprite]]}} - toggles {{ent|env_sprite|alt=env_sprites}} on/off as they have left-over use function which is officially still used in certain {{hls|2}} maps and targetted by {{ent|multi_manager}}.


<code>firetarget button</code> - assuming button is name of a [[func_button]] this command will press it
{{code|preset=2|firetarget button}} - assuming button is name of a {{ent|func_button}}, this command will press it


It prints messages to console about what is being fired if at least {{cmd|developer|2}} is set.
It prints messages to console about what is being fired if at least {{cmd|developer|2}} is set.




{{note|Use input seems to use outputID property of an event as use type, which means that the first parsed output in currect game session will actually be type <code>USE_ON</code>, second one will be <code>USE_SET</code> and the rest will be <code>USE_TOGGLE</code> (mind that map menu backgrounds is the place where first output in the current game session will be parsed) Use input fired via {{cmd|ent_fire}} will always be <code>USE_OFF</code> because ent_fire sets outputID of an IO event to 0.}}
{{note|Use input seems to use outputID property of an event as use type, which means that the first parsed output in currect game session will actually be type {{mono|USE_ON}}, second one will be {{mono|USE_SET}} and the rest will be {{mono|USE_TOGGLE}} (mind that map menu backgrounds is the place where first output in the current game session will be parsed) Use input fired via {{cmd|ent_fire}} will always be {{mono|USE_OFF}} because {{cmd|ent_fire}} sets outputID of an IO event to 0.}}


== See also ==
== See also ==
* [[use]]
* {{cmd|use}}

Latest revision as of 07:04, 22 June 2025

firetarget is a console command available in all Source Source games. This command calls an entity's Use function with use type USE_TOGGLE. It represents the way GoldSrc GoldSrc entities communicate.

Syntax

Syntax: firetarget <targetname or classname>

Not providing an argument is equivalent to !picker. !activator / !caller / !self target the player issuing the command.


Examples

firetarget env_sprite - toggles env_sprites on/off as they have left-over use function which is officially still used in certain Half-Life: Source Half-Life: Source maps and targetted by multi_manager.

firetarget button - assuming button is name of a func_button, this command will press it

It prints messages to console about what is being fired if at least developer 2 is set.


Note.pngNote:Use input seems to use outputID property of an event as use type, which means that the first parsed output in currect game session will actually be type USE_ON, second one will be USE_SET and the rest will be USE_TOGGLE (mind that map menu backgrounds is the place where first output in the current game session will be parsed) Use input fired via ent_fire will always be USE_OFF because ent_fire sets outputID of an IO event to 0.

See also