Template:O/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{doc/subpage}}
{{doc/subpage}}
Template to be used of entity outputs. For inputs use {{T|I}}
== Parameters ==
*{{param|activator}} - adds little grey text starting with <code>!activator = {{{activator}}}</code>
*{{param|activator}} - adds little grey text starting with <code>!activator = {{{activator}}}</code>
*{{param|caller}} - adds little grey text starting with <code>!caller = {{{caller|}}}</code> if activator is specified and caller is not this defaults to <code>this entity</code>, if caller=hide this won't be shown
*{{param|caller}} - adds little grey text starting with <code>!caller = {{{caller|}}}</code> if activator is specified and caller is not this defaults to <code>this entity</code>, if caller=hide this won't be shown
Line 5: Line 8:
* other params identical to [[Template:I]]
* other params identical to [[Template:I]]


== Examples ==
{{O|OnUser1| activator = activator of FireUser1 input |Fired in response to FireUser1 input}}
{{O|OnUser1| activator = activator of FireUser1 input |Fired in response to FireUser1 input}}



Revision as of 16:50, 26 April 2025

Edit-copy.png
This is a documentation subpage for Template:O.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Template to be used of entity outputs. For inputs use {{I}}

Parameters

  • {{{activator}}} - adds little grey text starting with !activator = {{{activator}}}
  • {{{caller}}} - adds little grey text starting with !caller = if activator is specified and caller is not this defaults to this entity, if caller=hide this won't be shown
  • {{{ac-is-this}}} - if specified then activator/caller params are ignored and grey text will say !activator = !caller = this entity
  • other params identical to Template:I

Examples

OnUser1
!activator = activator of FireUser1 input
!caller = this entity
Fired in response to FireUser1 input


OnGetValue <float>
!activator = activator of GetValue input
!caller = caller of GetValue input
Fired in response to the GetValue input; used when you don't want constant updates from the OutValue output.
If the Target Input's parameters is left empty, the math_counter's value is used.
Tip.pngTip:Useful for entities such as: logic_case,math_remap,logic_compare.


OnUnblockedClosing
!activator = !caller = this entity
Fired when the door is no longer blocked from closing.


OnItemPickedUp
!activator = !caller = NULL
Fired when this spawner's scavenge item is picked up by a player.

See also