AddOutput (Source 2): Difference between revisions
Jump to navigation
Jump to search

Note:
Example:
Tip:To easily remember the syntax start by typing
SirYodaJedi (talk | contribs) No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
Syntax: | Syntax: | ||
<code>outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite)</code> | <code>outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite)</code> | ||
{{note| | |||
* all five <code>></code> symbols are required even if the fields are left blank | * all five <code>></code> symbols are required even if the fields are left blank | ||
* inputname | * inputname has no default (in Source it defaulted to Use input) | ||
* delay if | * parameter if blank means the output will use its value if it has one (this is just regular output behavior not an AddOutput thing) | ||
* max times to fire defaults to -1 | * delay if blank defaults to 0 | ||
* max times to fire if blank defaults to -1 | |||
}} | |||
{{Example| | {{Example| | ||
* <code>ent_fire ent AddOutput OnUser1>target_entity>Kill>>2>-1</code> | * <code>ent_fire ent AddOutput OnUser1>target_entity>Kill>>2>-1</code> | ||
* <code>ent_fire ent AddOutput OnUser2>target2>FireUser4>>></code>}} | * <code>ent_fire ent AddOutput OnUser2>target2>FireUser4>>></code>}} | ||
{{Tip|To easily remember the syntax start by typing <code>>>>>></code> and then fill out the blanks which go in the same order as setting up an output in Hammer <!-- is this tip | |||
actually useful ? -->}} | |||
== See also == | == See also == | ||
* [[Generic Keyvalues, Inputs and Outputs (Source 2)#Inputs|Inputs available to all entities]] | * [[Generic Keyvalues, Inputs and Outputs (Source 2)#Inputs|Inputs available to all entities]] |
Latest revision as of 03:09, 6 May 2025


AddOutput
is an input available in all Source 2 games. It lets mappers add outputs to an entity at runtime. Unlike Source 1, this is not able to change keyvalues of an entity.
Syntax:
outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite)

- all five
>
symbols are required even if the fields are left blank - inputname has no default (in Source it defaulted to Use input)
- parameter if blank means the output will use its value if it has one (this is just regular output behavior not an AddOutput thing)
- delay if blank defaults to 0
- max times to fire if blank defaults to -1

ent_fire ent AddOutput OnUser1>target_entity>Kill>>2>-1
ent_fire ent AddOutput OnUser2>target2>FireUser4>>>

>>>>>
and then fill out the blanks which go in the same order as setting up an output in Hammer