Item item crate: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added brief description of item_dynamic_resupply)
m (a very intelligent individual added those last two outputs i assume)
Line 1: Line 1:
{{DISPLAYTITLE:item_item_crate}}
{{DISPLAYTITLE:item_item_crate}}
[[Image:Item_item_crate.jpg|thumb|250px|right|An item_item_crate.]]
[[Image:Item_item_crate.jpg|thumb|250px|right|An item_item_crate.]]
{{hl2 point|item_item_crate}}
{{hl2 point|item_item_crate}} It's the standard supply crate that creates specified content when broken.
 
==Entity description==
A supply crate. Creates its specified content when broken.


By default, it contains [[item_dynamic_resupply]], an entity that spawns whatever item the player needs most (health, armor, ammo).  By changing the crate's ItemClass, you can make it drop specific items.
By default, it contains [[item_dynamic_resupply]], an entity that spawns whatever item the player needs most (health, armor, ammo).  By changing the crate's ItemClass, you can make it drop specific items.
Line 35: Line 32:
{{O BasePropPhysics}}
{{O BasePropPhysics}}


{{KV|OnBreak|Fires when broken.|param=float}}
{{IO|OnBreak|Fires when broken.|param=float}}


{{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}}
{{IO|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 13:57, 14 June 2018

An item_item_crate.

Template:Hl2 point It's the standard supply crate that creates specified content when broken.

By default, it contains item_dynamic_resupply, an entity that spawns whatever item the player needs most (health, armor, ammo). By changing the crate's ItemClass, you can make it drop specific items.

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 <floatRedirectInput/float>
Fires when broken.


OnHealthChanged <floatRedirectInput/float>
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