This article's documentation is for Source 2. Click here for more information.

AddOutput (Source 2): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{LanguageBar}}
{{TabsBar|main=s2|base=AddOutput}}
{{TabsBar|main=s2|base=AddOutput}}
{{This is a|[[input]]|engine=Source 2}} It lets mappers add [[output]]s to an entity at runtime.
{{stub}}
{{This is a|[[input]]|name=AddOutput|engine=Source 2}} It lets mappers add [[output]]s to an entity at runtime. Unlike Source 1, this is not able to change keyvalues of an entity.


Syntax:
<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
* 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
}}
{{Example|
* <code>ent_fire ent AddOutput OnUser1>target_entity>Kill>>2>-1</code>
* <code>ent_fire ent AddOutput OnUser2>target2>FireUser4>>></code>}}


[[AddOutput]] exists in a barebone ways in [[Source 2]] and has a lot of quirks. You are unable to edit a lot of keyvalues without 3rd party plugins.
{{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
{{note|Syntax is differs from Source 1. Syntax example with NO parameters in Source 2: <code>Output>Targetname>Input>Parameter>Delay>MaxTimesToFire</code>}}
actually useful ? -->}}


{{stub}}
== See also ==
* [[Generic Keyvalues, Inputs and Outputs (Source 2)#Inputs|Inputs available to all entities]]

Latest revision as of 03:09, 6 May 2025

English (en)Translate (Translate)

Stub

This article or section is a stub. You can help by expanding it.

AddOutput is an input available in all Source 2 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)

Note.pngNote:
  • 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
PlacementTip.pngExample:
  • ent_fire ent AddOutput OnUser1>target_entity>Kill>>2>-1
  • ent_fire ent AddOutput OnUser2>target2>FireUser4>>>
Tip.pngTip:To easily remember the syntax start by typing >>>>> and then fill out the blanks which go in the same order as setting up an output in Hammer

See also