Template:I Breakable: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(I don't know why SetMass is here, but it is)
(Fix description for SetMass input)
 
(7 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{ScrollBox|title=Breakable|
{{lang|Template:I Breakable}}
; <code>Break</code>
* {{param|prop|0}} - If nonzero, shows prop related inputs. See also: {{tl2|I BreakableProp}}.
: Removes the entity from the server and creates its gibs on the client.
* {{param|brush|0}} - If nonzero, shows brush related inputs. See also: {{tl2|I BreakableBrush}}.
; <code>SetHealth <[[int]]></code>  
* {{param|nohl2|0}} - If nonzero, hides [[weapon_physcannon]] related inputs. Only effective with <code>prop=1</code>.
: Sets the breakable's health (zero means break).
The result when setting both {{param|prop}} and {{param|brush}} to nonzero values is not supposed to be used.
; <code>AddHealth <int></code>
 
; <code>RemoveHealth <int></code>
The following is the result with no parameters.
: Adds to/removes from the breakable's health.
 
; <code>EnablePhyscannonPickup</code>
 
; <code>DisablePhyscannonPickup</code>
{{ {{PAGENAME}} | prop=0 | brush=0 | nohl2=1 }}
: Allows/prevents the [[weapon_physcannon|Gravity Gun]] to pick the breakable up.
 
; <code>SetMass <[[float]]></code>
<onlyinclude><includeonly><!--
: Set mass of this object. {{todo|In what unit?}}
-->{{minititle|Breakable{{#ifeq:{{{prop|0}}}|0||Prop}}{{#ifeq:{{{brush|0}}}|0||Brush}}}}
{{I DamageFilter}}
{{I|Break|Breaks the breakable.}}
{{I Shadow}}
{{I|SetHealth|param=integer|Sets a new value for the breakable's health. If the breakable's health reaches zero it will break.}}
{{I Targetname}}
{{I|AddHealth|param=integer|Adds health to the breakable.}}
}}
{{I|RemoveHealth|param=integer|Removes health from the breakable.}}<!--
-->{{#ifeq: {{{prop|0}}}|0||
{{I|physdamagescale|param=float|Sets '''Physics Impact Damage Scale'''. 0 means this feature is disabled for backwards compatibility.}}<!--
-->{{#ifeq: {{{nohl2}}}|1||{{I|EnablePhyscannonPickup|Makes the breakable able to picked up by the gravity gun.}}
{{I|DisablePhyscannonPickup|Makes the breakable not able to picked up by the gravity gun.}}
{{I|EnablePuntSound|since=EP1|Allow this prop from playing its '''Punt Sound''' sound when punted by the gravity gun.}}
{{I|DisablePuntSound|since=EP1|Prevent this prop from playing its '''Punt Sound''' sound when punted by the gravity gun.}}}}
}}<!--
-->{{#ifeq: {{{brush|0}}}|0||
{{I|SetMass|param=float|Sets the mass of the breakables' physics object, if it has one.}}
}}<!--
--></includeonly></onlyinclude>
 
[[Category:Input Templates|Breakable]]

Latest revision as of 05:44, 3 October 2025

  • {{{prop|0}}} - If nonzero, shows prop related inputs. See also: {{I BreakableProp}}.
  • {{{brush|0}}} - If nonzero, shows brush related inputs. See also: {{I BreakableBrush}}.
  • {{{nohl2|0}}} - If nonzero, hides weapon_physcannon related inputs. Only effective with prop=1.

The result when setting both {{{prop}}} and {{{brush}}} to nonzero values is not supposed to be used.

The following is the result with no parameters.


Breakable:

Break
Breaks the breakable.
SetHealth <integer>
Sets a new value for the breakable's health. If the breakable's health reaches zero it will break.
AddHealth <integer>
Adds health to the breakable.
RemoveHealth <integer>
Removes health from the breakable.