Item item crate: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Cleanup)
Line 7: Line 7:


==Keyvalues==
==Keyvalues==
* {{KV BasePropPhysics}}
{{KV BasePropPhysics}}
* '''CrateType'''
{{KV|CrateType|int|Deprecated.}}
: <integer> Deprecated
 
* '''ItemClass'''
{{KV|ItemClass|pointentityclass|Class name of the entity to spawn when the crate is broken. Suggested point entity: [[item_dynamic_resupply]]}}
: <pointentityclass> Class name of the entity to spawn when the crate is broken. Suggested point entity: [[item_dynamic_resupply]]
 
* '''ItemCount'''
{{KV|ItemCount|int|Number of items to emit upon breakage.}}
: <integer> Number of items to emit upon breakage


==Flags==
==Flags==
* {{Fl BasePropPhysics}}
{{Fl BasePropPhysics}}


==Inputs==
==Inputs==
* {{I BasePropPhysics}}
{{I BasePropPhysics}}
* {{I DamageFilter}}
{{I DamageFilter}}
* '''Break'''
 
: Breaks the breakable.
{{IO|Break|Breaks the breakable.|}}
* '''SetHealth <integer>'''
: Sets a new value for health. If the breakable's health reaches zero it will break. Use Break input instead of 0.
* '''AddHealth <integer>'''
: Adds health to the breakable. If the breakable's health reaches zero it will break.
* '''RemoveHealth <integer>'''
: Removes health from the breakable. If the breakable's health reaches zero it will break.


{{IO|SetHealth|Sets a new value for health. If the breakable's health reaches zero it will break. Use Break input instead of 0.|param=int}}
{{IO|AddHealth|Adds health to the breakable. If the breakable's health reaches zero it will break.|param=int}}
{{IO|RemoveHealth|Removes health from the breakable. If the breakable's health reaches zero it will break.
|param=int}}
==Outputs==
==Outputs==
* {{O BasePropPhysics}}
{{O BasePropPhysics}}
* '''OnBreak'''
 
: Fires when broken.
{{KV|OnBreak|Fires when broken.|param=float}}
* '''OnHealthChanged <float>'''
 
: Fires when the health of this breakable changes, passing the new value of health as a percentage of max health, from [0..1].
{{KV|OnHealthChanged|Fires when the health of this breakable changes, passing the new value of health as a percentage of max health, from [0..1].|param=float}}


==See also==
==See also==

Revision as of 12:42, 4 February 2012

An item_item_crate.

Template:Hl2 point

Entity description

A supply crate. Creates its specified content when broken.

Keyvalues

Note.pngNote:Page left for viewable history, content moved to prop_physics
CrateType ([todo internal name (i)]) <integer>
Deprecated.


ItemClass ([todo internal name (i)]) <pointentityclass>
Class name of the entity to spawn when the crate is broken. Suggested point entity: item_dynamic_resupply


ItemCount ([todo internal name (i)]) <integer>
Number of items to emit upon breakage.

Flags

Note.pngNote:Page left for viewable history, content moved to prop_physics

Inputs

Note.pngNote:Page left for viewable history, content moved to prop_physics

DamageFilter:

SetDamageFilter <stringRedirectInput/string>
Sets the entity to use as damage filter. Pass in an empty string (no parameter) to clear the damage filter.


Break
Breaks the breakable.


SetHealth <integerRedirectInput/integer>
Sets a new value for health. If the breakable's health reaches zero it will break. Use Break input instead of 0.


AddHealth <integerRedirectInput/integer>
Adds health to the breakable. If the breakable's health reaches zero it will break.


RemoveHealth <integerRedirectInput/integer>
Removes health from the breakable. If the breakable's health reaches zero it will break.

Outputs

Note.pngNote:Page left for viewable history, content moved to prop_physics


OnBreak ([todo internal name (i)]) <Fires when broken.>


OnHealthChanged ([todo internal name (i)]) <[[Fires when the health of this breakable changes, passing the new value of health as a percentage of max health, from [0..1].|Fires when the health of this breakable changes, passing the new value of health as a percentage of max health, from [0..1].]]>

See also