Template:O Breakable: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(parameter notes)
(titles)
Line 1: Line 1:
<noinclude>This template isn't in line with anything specific in code. default shows only outputs for brushes.
<noinclude>This template isn't in line with anything specific in code. default shows only outputs for brushes.
*<code>prop=1</code> shows outputs for props as well. there's nothing brushes have that props ''don't'' have.
*<code>prop=1</code> shows outputs for props as well. there's nothing brushes have that props ''don't'' have.
*<code>nohl2=1</code> eliminates the hl2-specific outputs.</noinclude>{{#ifeq:{{{prop}}}|1|{{minititle|BreakableProp}}
*<code>nohl2=1</code> eliminates the hl2-specific outputs.</noinclude>{{#ifeq:{{{prop}}}|1|{{minititle|Breakable (prop)}}
{{IO|OnTakeDamage|Fired when damage is taken.}}
{{IO|OnTakeDamage|Fired when damage is taken.}}
{{#ifeq:{{{nohl2}}}|1||{{IO|OnPhysCannonAnimatePreStarted|Fired when prop starts its <code>ACT_PHYSCANNON_ANIMATE_PRE</code> [[activity]]. Caused by the object being picked up by the gravity gun.}}
{{#ifeq:{{{nohl2}}}|1||{{IO|OnPhysCannonAnimatePreStarted|Fired when prop starts its <code>ACT_PHYSCANNON_ANIMATE_PRE</code> [[activity]]. Caused by the object being picked up by the gravity gun.}}
Line 9: Line 9:
{{IO|OnPhysCannonPullAnimFinished|Fired when prop has finished all gravity gun-related animations.}}
{{IO|OnPhysCannonPullAnimFinished|Fired when prop has finished all gravity gun-related animations.}}
}}|}}
}}|}}
{{minititle|Breakable}}
{{minititle|Breakable (common)}}
{{IO|OnBreak|Fired when this object breaks. {{ent|!activator}} is whatever breaks the object.}}
{{IO|OnBreak|Fired when this object breaks. {{ent|!activator}} is whatever breaks the object.}}
{{IO|OnHealthChanged|param=float|Fired whenever the health of the breakable has increased or decreased. {{outadd|the new health amount as a decimal percent (e.g. 45% {{=}} 0.45)}}}}
{{IO|OnHealthChanged|param=float|Fired whenever the health of the breakable has increased or decreased. {{outadd|the new health amount as a decimal percent (e.g. 45% {{=}} 0.45)}}}}

Revision as of 14:35, 5 October 2018

This template isn't in line with anything specific in code. default shows only outputs for brushes.

  • prop=1 shows outputs for props as well. there's nothing brushes have that props don't have.
  • nohl2=1 eliminates the hl2-specific outputs.

Breakable (common):

OnBreak
Fired when this object breaks. !activator is whatever breaks the object.
OnHealthChanged <float>
Fired whenever the health of the breakable has increased or decreased. This output automatically puts the new health amount as a decimal percent (e.g. 45% = 0.45) into the parameter box for inputs, if the mapper does not override the parameter with something else.