Item item crate: Difference between revisions
Jump to navigation
Jump to search
Note:Page left for viewable history, content moved to prop_physics
Note:Page left for viewable history, content moved to prop_physics
Note:Page left for viewable history, content moved to prop_physics
Note:Page left for viewable history, content moved to prop_physics
No edit summary |
(Cleanup) |
||
Line 7: | Line 7: | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV BasePropPhysics}} | |||
{{KV|CrateType|int|Deprecated.}} | |||
{{KV|ItemClass|pointentityclass|Class name of the entity to spawn when the crate is broken. Suggested point entity: [[item_dynamic_resupply]]}} | |||
{{KV|ItemCount|int|Number of items to emit upon breakage.}} | |||
==Flags== | ==Flags== | ||
{{Fl BasePropPhysics}} | |||
==Inputs== | ==Inputs== | ||
{{I BasePropPhysics}} | |||
{{I DamageFilter}} | |||
{{IO|Break|Breaks the breakable.|}} | |||
{{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}} | |||
{{KV|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}} | |||
==See also== | ==See also== |
Revision as of 12:42, 4 February 2012
Entity description
A supply crate. Creates its specified content when broken.
Keyvalues

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

Inputs

DamageFilter:
- SetDamageFilter <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 <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.
Outputs

- 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
- Crates for basic crates
- item_ammo_crate for the infinite-ammo bins