Talk:AddOutput
Proper Syntax for AddOutput
While using Hammer, with the Object Properties window open, you'll press the Outputs tab, then click "Add..." At this point, you'll choose an Output listed in the "My output named" list and begin entering your parameters/options/arguments.
For example, on a team_control_point_round, you might add an output that reads as follows:
My output named: OnStart
Targets entities named: Timer_Game
Via this input: AddOutput
With a parameter override of: OnSetupFinished door_one:Open::0:-1
After a delay in seconds of: 0.00
Fire once only (checkbox): Unchecked
Breakdown of the parameter override line...
"OnSetupFinished" is an Output for the team_round_timer entity.
"door_one" is the name of the entity I want affected by this output.
"Open" is the parameter (command) I send to the specified entitiy (door_one) in this case.
The "::" tells the engine that I'm not sending any other parameters with that "Open" command.
"0" is the delay (meaning, I want it done immediately).
"-1" means I want it to fire an infinite number of times.
Basically, I've created an output that tells another entity to create an output that tells a door to open when the setup timer is finished.
Note: Do NOT enclose your parameter override string in quotation marks ("OnSetupFinished door_one:Open::0:-1"). The compiler will give you an error and crash.
Page information incorrect and incomplete
1) The information about <max times to fire> is wrong. Using 0 is the same as using -1. If you want the string to fire only once, use 1.
2) You can also use the comma as a delimeter.
3) <max times to fire> and <delay> can be omitted from the string in any combination.
The following strings will produce the same result; sound when triggered with zero delay:
OnTrigger amb_sound_bell,PlaySound,,0,-1
OnTrigger amb_sound_bell,PlaySound,,0,
OnTrigger amb_sound_bell,PlaySound,,,-1
OnTrigger amb_sound_bell,PlaySound,,,
4) By far the most interesting part is when using the AddOutput parameter you can actually control the number of <max times to fire>
OnTrigger amb_sound_bell,PlaySound,,,4 - means the sound can be triggered 4 times and then no more.
Please confirm for Portal2 SDK and/or other SDKs.
(--Species3259 09:24, 17 September 2017 (UTC)--)
"use use"
Was use use a mistake in the sentence Instead, use use detailed quotes (i.e. “ and ”).? --Mandrew (talk) 02:42, 24 April 2022 (PDT)