Generic Keyvalues, Inputs and Outputs/Outputs: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(using strings)
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{lang|Template:O BaseEntity}}
[[Category:CBaseEntity]]
This template is our holder for all [[outputs]] that are assigned through {{ent|CBaseEntity}}.
== Outputs ==
 
{{O|OnUser1|to=OnUser4|activator = activator of FireUser1-4 inputs|These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see [[User Inputs and Outputs]].}}
To add the <code>OnKilled</code> output, use {{Code|<nowiki>{{O BaseEntity|l4d=1}}</nowiki>}}. This output is in the [[Left 4 Dead (engine branch)|Left 4 Dead engine branch]] '''only''', no other source 1 games.
{{O|OnKilled|only={{l4d}}|activator = !caller = none|caller=hide|This output fires when the entity is killed and removed from the game.}}
 
For games on the Source 2 engine, use {{Code|<nowiki>{{O BaseEntity|s2=1}}</nowiki>}}
 
[[Category:Output Templates|BaseEntity]]
----
</noinclude><!--
-->{{minititle|{{O BaseEntity/strings|Base}}}}
{{IO|{{O BaseEntity/strings|OnUser1To4}}|to=OnUser4|{{O BaseEntity/strings|OnUser1To4Desc}}}}<!--
-->{{#if:{{{l4d|}}}|<!--
-->{{IO|{{O BaseEntity/strings|OnKilledL4D}}|only={{l4d}}|{{O BaseEntity/strings|OnKilledL4DDesc}}}}| }}<!--
-->{{#if:{{{s2|}}}|<!--
-->{{IO|{{O BaseEntity/strings|OnKilledS2}}|{{O BaseEntity/strings|OnKilledS2Desc}}}}| }}

Latest revision as of 15:10, 20 October 2025

Outputs

OnUser1 to OnUser4
!activator = activator of FireUser1-4 inputs
!caller = this entity
These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (only in Left 4 Dead)
!activator = !caller = none
This output fires when the entity is killed and removed from the game.