Template:O Breakable: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
No edit summary
Line 1: Line 1:
{{ScrollBox|title=Breakable|noscroll=true|
; <code>OnBreak</code>
: Fired when this breakable breaks. {{activator|breaker}}
; <code>OnTakeDamage</code>
: The breakable has taken damage.
; <code>OnHealthChanged <[[float]]></code>
: The health of the breakable has changed. Passes the new value as a [[normal]]ised percentage of max health.
; <code>OnPhysCannonDetach</code>
: Prop has started its <code>ACT_PHYSCANNON_DETACH</code> [[activity]] (caused by the [[gravity gun]] ripping it from a wall).
; <code>OnPhysCannonAnimatePreStarted</code>
; <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}}
{{O Targetname}}
* '''OnBreak'''
}}
: Fired when this breakable breaks. {{activator|breaker}}
* '''OnHealthChanged <float>'''
: Fired when the health of this breakable changes, passing the new value of health as a percentage of max health, from [0..1].
* '''OnPhysCannonDetach'''
: Fired when the physcannon has ripped this breakable off of the wall. Only fired if ACT_PHYSCANNON_DETACH is defined in the model this breakable is using.
* '''{{EP1 add|OnPhysCannonAnimatePreStarted}}'''
: Fired when this prop starts playing the Pre physcannon-pull activity, caused by the player trying to grab this prop with the physcannon. Only fired if the ACT_PHYSCANNON_ANIMATE_PRE activity is defined in the model this breakable is using.
* '''{{EP1 add|OnPhysCannonAnimatePullStarted}}'''
: Fired when this prop starts playing the physcannon-pull activity, caused by the player trying to grab this prop with the physcannon. Only fired if the ACT_PHYSCANNON_ANIMATE activity is defined in the model this breakable is using. If the prop has Pre pull anim, this will be fired after the Pre anim has finished playing.
* '''{{EP1 add|OnPhysCannonPullAnimFinished}}'''
: Fired when this prop has finished playing the physcannon-pull activity, caused by the player trying to grab this prop with the physcannon. Only fired if the ACT_PHYSCANNON_ANIMATE activity is defined in the model this breakable is using. If the prop has Pre & Post pull anims, this will be fired after the Post anim has finished playing.
* '''{{EP1 add|OnPhysCannonAnimatePostStarted}}'''
: Fired when this prop starts playing the Post physcannon-pull activity. Only fired if the ACT_PHYSCANNON_ANIMATE_POST activity is defined in the model this breakable is using.

Revision as of 04:26, 18 September 2009

Breakable:
OnBreak
Fired when this breakable breaks. (!activator is the breaker)
OnTakeDamage
The breakable has taken damage.
OnHealthChanged <float>
The health of the breakable has changed. Passes the new value as a normalised percentage of max health.
OnPhysCannonDetach
Prop has started its ACT_PHYSCANNON_DETACH activity (caused by the gravity gun ripping it from a wall).
OnPhysCannonAnimatePreStarted
OnPhysCannonAnimatePullStarted
Prop has started its ACT_PHYSCANNON_ANIMATE_PRE or ACT_PHYSCANNON_ANIMATE activities. Both are caused by the player trying to grab the prop with the gravity gun; ANIMATE_PRE plays once, then ANIMATE starts looping.
OnPhysCannonAnimatePostStarted
Prop has started its ACT_PHYSCANNON_ANIMATE_POST activity (caused by the player letting the prop go from the gravity gun).
OnPhysCannonPullAnimFinished
Prop has finished all gravity-gun related animations.