AddOutput: Difference between revisions
(darnias told me to change this, if its wrong blame him not me) |
(It is wrong, the output fails to even function with a different value than these) |
||
Line 1: | Line 1: | ||
{{orphan}} | {{orphan}} | ||
The AddOutput output in [[Hammer]] uses the syntax : <code><key> <value></code> '''or''' <output name> <target name>:<input name>:<parameter>:<delay>:<max times to fire (-1 | The AddOutput output in [[Hammer]] uses the syntax : <code><key> <value></code> '''or''' <output name> <target name>:<input name>:<parameter>:<delay>:<max times to fire (-1 == infinite)> to be used in the parameters field of the [[output]] | ||
Line 11: | Line 11: | ||
It is worth noting that if you have no parameters, then put nothing between the two colons. | It is worth noting that if you have no parameters, then put nothing between the two colons. | ||
Max times to fire will not work with values other than 0 or -1. 0 = fire once, -1 = fire infinite times. | |||
==Examples== | ==Examples== | ||
Line 24: | Line 25: | ||
This changes the target name of the prop. In this case, it is changing it's own name, so !self == prop01. | This changes the target name of the prop. In this case, it is changing it's own name, so !self == prop01. | ||
:Format: <code><output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 | :Format: <code><output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, 0 means once and -1 means infinite></code> | ||
{ | { | ||
"classname" "tf_logic_auto" | "classname" "tf_logic_auto" |
Revision as of 02:07, 14 August 2018

You can help by

The AddOutput output in Hammer uses the syntax : <key> <value>
or <output name> <target name>:<input name>:<parameter>:<delay>:<max times to fire (-1 == infinite)> to be used in the parameters field of the output

\"
characters). It will cause fatal errors with opening and/or compiling your map and may need to be fixed by manually editing the VMF in a text editor. Instead, use use detailed quotes (i.e. “
and ”
).Syntax example with parameters: OutputName TargetName:Color:255 255 255:0:-1
Syntax example with NO parameters: OutputName TargetName:Open::0:-1
It is worth noting that if you have no parameters, then put nothing between the two colons.
Max times to fire will not work with values other than 0 or -1. 0 = fire once, -1 = fire infinite times.
Examples
- Format:
<key> <value>
{ "classname" "prop_physics" "targetname" "prop01" . . . "OnHealthChange" "!self,AddOutput,targetname prop9001" }
This changes the target name of the prop. In this case, it is changing it's own name, so !self == prop01.
- Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, 0 means once and -1 means infinite>
{ "classname" "tf_logic_auto" . . . "OnMapSpawn" "team_round_timer_red,AddOutput,OnFinished game_round_win:RoundWin::0:-1,0,-1" }
This adds an output to an entity with the targetname "team_round_timer_red".
- Trigger_Multiple
- Name: Ghost
- Outputs
- My Output Named: OnEndTouch
- Targets entities named: !activator
- Via this input: Alpha
- With a parameter override of: 255
- After a delay in seconds: 0.10
- My Output Named: OnStartTouch
- Targets entities named: !activator
- Via this input: AddOutput
- With a parameter override of: rendermode 1
- After a delay in seconds: 0.00
- My Output Named: OnStartTouch
- Targets entities named: !activator
- Via this input: Alpha
- With a parameter override of: 120
- After a delay in seconds: 0.00
Results in translucent player when standing in the trigger_multiple (OnStartTouch) and visible again when not in the trigger_multiple (OnEndTouch).