Template:O/doc: Difference between revisions

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


== Parameters ==
*{{param|activator}} - adds little grey text starting with <code>!activator = {{{activator}}}</code>. Deprecates {{t|activator}}.
*{{param|caller}} - adds little grey text starting with <code>!caller = {{{caller|}}}</code>. <br>If activator is specified and caller is not, this defaults to <code>this entity</code> (so make sure to check caller too and ensure this is correct if adding activator parameter). If caller=hide, this won't be shown.
*{{param|ac-is-this}} - if specified then activator/caller params are ignored and grey text will say <code>!activator = !caller = this entity</code>
* 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}}


Line 9: Line 15:
|Fired in response to the <code>GetValue</code> input; used when you don't want constant updates from the <code>OutValue</code> output.<br>If the Target Input's parameters is left empty, the math_counter's value is used. {{tip|Useful for entities such as: {{ent|logic_case}},{{ent|math_remap}},{{ent|logic_compare}}.}} |param=float}}
|Fired in response to the <code>GetValue</code> input; used when you don't want constant updates from the <code>OutValue</code> output.<br>If the Target Input's parameters is left empty, the math_counter's value is used. {{tip|Useful for entities such as: {{ent|logic_case}},{{ent|math_remap}},{{ent|logic_compare}}.}} |param=float}}


{{O|OnUnblockedClosing| activator = !caller = !self|caller=hide
{{O|OnUnblockedClosing|ac-is-self=1|Fired when the door is no longer blocked from closing.}}
|Fired when the door is no longer blocked from closing.}}
 
{{O|OnItemPickedUp|activator = !caller = NULL|caller=hide|Fired when this spawner's scavenge item is picked up by a player.}}


== See also ==
== See also ==
* [[Template:O/PagesUsingACparams]]
* [[Template:O/CallerUseCheck]]
* {{T|I}}
* {{T|I}}
* [[Talk:Targetname#!caller is weirdly incosistent]]
* [[Template talk:O]]
* [[Targetname#Special targetnames]]

Latest revision as of 03:58, 20 May 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}}}. Deprecates {{activator}}.
  • {{{caller}}} - adds little grey text starting with !caller = .
    If activator is specified and caller is not, this defaults to this entity (so make sure to check caller too and ensure this is correct if adding activator parameter). 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