CBreakable: Difference between revisions
No edit summary |
(→Fields) |
||
Line 33: | Line 33: | ||
{{DEFINE_KEYFIELD|m_GibDir|FIELD_VECTOR|gibdir}} | {{DEFINE_KEYFIELD|m_GibDir|FIELD_VECTOR|gibdir}} | ||
{{DEFINE_KEYFIELD|m_PerformanceMode|FIELD_INTEGER|PerformanceMode}} | {{DEFINE_KEYFIELD|m_PerformanceMode|FIELD_INTEGER|PerformanceMode}} | ||
== Keyvalues == | |||
{{note|Those defined in [https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/func_break.cpp#L193 CBreakable::KeyValue] function that may have custom behavior set instead of just setting a single field}} | |||
{{KV|material|intn=0|int|Sets m_Material to values 0 up 3 (0:glass, 1:metal, 2:flesh, 3:wood), if value outside this range is used it will be set to 0}} | |||
{{KV|deadmodel|intn=0||Does nothing}} | |||
{{KV|shards|intn=0||Does nothing}} | |||
{{KV|lip|intn=0||Does nothing}} | |||
{{KV|gibmodel|intn=0|string|Sets m_iszGibModel}} | |||
{{KV|spawnobject|intn=0|int|Takes index to array of strings pSpawnObjects and sets m_iszSpawnObject to the chosen element}} | |||
{{KV|propdata|intn=0|int|Takes index to array of strings pFGDPropData and sets m_iszPropData to the chosen element. Gives <code>Warning("func_breakable with invalid propdata %d.\n", pdata );</code> if value out of range given}} | |||
=== Inputs === | === Inputs === |
Revision as of 04:28, 20 September 2024
![]() |
---|
CBreakable |
![]() |
Entities linked to this class
Fields
m_Material <FIELD_INTEGER>
m_hBreaker <FIELD_EHANDLE>
m_angle <FIELD_FLOAT>
m_iszGibModel <FIELD_STRING>
m_iszSpawnObject <FIELD_STRING>
m_bTookPhysicsDamage <FIELD_BOOLEAN>
m_iszPropData <FIELD_STRING>
m_flDmgModBullet <FIELD_FLOAT>
m_flDmgModClub <FIELD_FLOAT>
m_flDmgModExplosive <FIELD_FLOAT>
m_iszPhysicsDamageTableName <FIELD_STRING>
m_iszBreakableModel <FIELD_STRING>
m_iBreakableSkin <FIELD_INTEGER>
m_iBreakableCount <FIELD_INTEGER>
m_iMaxBreakableSize <FIELD_INTEGER>
m_iszBasePropData <FIELD_STRING>
m_iInteractions <FIELD_INTEGER>
m_explodeRadius <FIELD_FLOAT>
m_iszModelName <FIELD_STRING>
m_hPhysicsAttacker <FIELD_EHANDLE>
m_flLastPhysicsInfluenceTime <FIELD_TIME>
Keyfields
m_ExplosionMagnitude <FIELD_INTEGER> (explodemagnitude)
m_flPressureDelay <FIELD_FLOAT> (PressureDelay)
m_iMinHealthDmg <FIELD_INTEGER> (minhealthdmg)
m_Explosion <FIELD_INTEGER> (explosion)
m_GibDir <FIELD_VECTOR> (gibdir)
m_PerformanceMode <FIELD_INTEGER> (PerformanceMode)
Keyvalues

- material <integer>
- Sets m_Material to values 0 up 3 (0:glass, 1:metal, 2:flesh, 3:wood), if value outside this range is used it will be set to 0
- deadmodel
- Does nothing
- shards
- Does nothing
- lip
- Does nothing
- gibmodel <string>
- Sets m_iszGibModel
- spawnobject <integer>
- Takes index to array of strings pSpawnObjects and sets m_iszSpawnObject to the chosen element
- propdata <integer>
- Takes index to array of strings pFGDPropData and sets m_iszPropData to the chosen element. Gives
Warning("func_breakable with invalid propdata %d.\n", pdata );
if value out of range given
Inputs
m_impactEnergyScale <FIELD_FLOAT> (physdamagescale)
Input functions
Break <FIELD_VOID> linked function: InputBreak
- description todo
SetHealth <FIELD_INTEGER> linked function: InputSetHealth
- description todo
AddHealth <FIELD_INTEGER> linked function: InputAddHealth
- description todo
RemoveHealth <FIELD_INTEGER> linked function: InputRemoveHealth
- description todo
SetMass <FIELD_FLOAT> linked function: InputSetMass
- description todo
Touch think function
- Has checks for 'Break on Touch', 'Break on Pressure' flags
Think function
Die <FIELD_VOID>
- Used as think function for delaying breaking of breakable by
PressureDelay
after it was stood on
Outputs
- m_OnBreak
- OnBreak
- m_OnHealthChanged
- OnHealthChanged