Template:O Breakable: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(hide hl2 outputs with nohl2. show prop outputs with prop.)
Line 1: Line 1:
{{ScrollBox|title=Breakable|noscroll=true|
{{#ifeq:{{{prop}}}|1|
; <code>OnBreak</code>
{{IO|OnTakeDamage|Fired when damage is taken.}}
: Fired when this breakable breaks. {{activator|breaker}}
{{#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.}}
; <code>OnTakeDamage</code>
{{IO|OnPhysCannonAnimatePullStarted|Fired when prop has started its <code>ACT_PHYSCANNON_ANIMATE</code> activity. <code>ACT_PHYSCANNON_ANIMATE_PRE</code> plays once, then <code>ACT_PHYSCANNON_ANIMATE</code> starts looping.}}
: The breakable has taken damage.
{{IO|OnPhysCannonDetach|Fired when prop has started its <code>ACT_PHYSCANNON_DETACH</code> activity (caused by the gravity gun ripping it from a wall).}}
; <code>OnHealthChanged <[[float]]></code>
{{IO|OnPhysCannonAnimatePostStarted|Fired when prop has started its <code>ACT_PHYSCANNON_ANIMATE_POST</code> activity (caused by the player letting the prop go from the gravity gun).}}
: The health of the breakable has changed. Passes the new value as a [[normal]]ised percentage of max health.
{{IO|OnPhysCannonPullAnimFinished|Fired when prop has finished all gravity gun-related animations.}}
; <code>OnPhysCannonDetach</code>
}}|}}{{minititle|Breakable}}
: Prop has started its <code>ACT_PHYSCANNON_DETACH</code> [[activity]] (caused by the [[gravity gun]] ripping it from a wall).
{{IO|OnBreak|Fired when this object breaks. {{ent|!activator}} is whatever breaks the object.}}
; <code>OnPhysCannonAnimatePreStarted</code>
{{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)}}}}
; <code>OnPhysCannonAnimatePullStarted</code>
: Prop has started its <code>ACT_PHYSCANNON_ANIMATE_PRE</code> or <code>ACT_PHYSCANNON_ANIMATE</code> activities. Both are caused by the player trying to grab the prop with the gravity gun; <code>ANIMATE_PRE</code> plays once, then <code>ANIMATE</code> starts looping.
; <code>OnPhysCannonAnimatePostStarted</code>
: Prop has started its <code>ACT_PHYSCANNON_ANIMATE_POST</code> activity (caused by the player letting the prop go from the gravity gun).
; <code>OnPhysCannonPullAnimFinished</code>
: Prop has finished all gravity gun-related animations.
{{O Targetname}}
}}

Revision as of 00:01, 12 September 2018

Breakable:

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.