Template:O: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(I think it was better with the exclamations, since that's what mappers who are reading the outputs section would be using)
(no)
 
(4 intermediate revisions by 2 users not shown)
Line 6: Line 6:
; {{#if: {{{deprecated|}}} | <del> }}<!--
; {{#if: {{{deprecated|}}} | <del> }}<!--
--><kbd>{{{1}}}</kbd> <!--
--><kbd>{{{1}}}</kbd> <!--
-->{{#if: {{{to|}}}        | <span style="font-weight: normal;">to</span> <kbd>{{{to}}}</kbd>}}<!--
-->{{#if: {{{to|}}}        | <span style="font-weight: normal;">to</span> <kbd>{{{to}}}</kbd>}} <!--
-->{{#if: {{{param|}}}      | {{KV Type|{{{param}}}}} }}<!--
-->{{#if: {{{param|}}}      | {{VT|{{{param}}}|type=output}} }}<!--
-->{{#if: {{{deprecated|}}} | </del> }}<!--
-->{{#if: {{{deprecated|}}} | </del> }}<!--
-->{{#if: {{{only|}}}      | &nbsp;{{only|{{IO/gameicon|{{{only}}}}}}}}}<!--
-->{{#if: {{{only|}}}      | &nbsp;{{only|{{IO/gameicon|{{{only}}}}}}}}}<!--
Line 18: Line 18:
: {{#if: {{{deprecated|}}} | {{Dictionary/Deprecated/{{pagelang}}}}{{period}}<br> }}<!--
: {{#if: {{{deprecated|}}} | {{Dictionary/Deprecated/{{pagelang}}}}{{period}}<br> }}<!--
-->{{#if:{{{ac-is-self|}}}{{{ac-is-this|}}}
-->{{#if:{{{ac-is-self|}}}{{{ac-is-this|}}}
| {{O/PagesUsingACparams}}<small style="color:gray"><kbd>!activator = !caller = this entity</kbd></small><br>{{O/PagesUsingACparams}}
| {{O/PagesUsingACparams}}<small style="color:gray"><kbd>!activator = !caller = </kbd>this entity</small><br>{{O/PagesUsingACparams}}
|{{#if: {{{activator|}}}{{{caller|}}}  
|{{#if: {{{activator|}}}{{{caller|}}}  
| {{O/PagesUsingACparams}}<small style="color:gray"><kbd>!activator</kbd> = {{{activator}}}</small><!--
| {{O/PagesUsingACparams}}<small style="color:gray"><kbd>!activator</kbd> = {{{activator}}}</small><!--
-->{{#ifeq:{{{caller|}}}|hide||<br><small style="color:gray"><kbd>!caller = </kbd>{{{caller|this entity}}}</small>}}<br>}}
-->{{#ifeq:{{{caller|}}}|hide||<br><small style="color:gray"><kbd>!caller = </kbd>{{{caller|this entity}}}</small>}}<br>}}<!--
-->{{#ifeq:{{language}}|en|{{#if:{{{caller|}}}|{{O/CallerUseCheck}}}}}}
}}<!--
}}<!--
-->{{#if: {{{2|}}} | {{{2}}}}}<!--
-->{{#if: {{{2|}}} | {{{2}}}}}<!--

Latest revision as of 03:48, 20 May 2025

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

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