Difference between revisions of "CBreakable (CS)"

From AlliedModders Wiki
Jump to: navigation, search
m
(Added some contents.)
Line 1: Line 1:
[[Category:CS Offset List]]
+
[[Category:CS Class List]]
  
  
*[[CBaseEntity Offset List (Counter-Strike)|CBaseEntity]]
+
== Basic Information ==
** [[CBaseDelay Offset List (Counter-Strike)|CBaseDelay]]
+
 
 +
* '''Classname''': CBreakable. <br />
 +
* '''Inheriting Instances''': func_breakable.<br />
 +
* '''Description''': The ''func_breakable'' entity allows you to create a breakable brush. <br />
 +
 
 +
 
 +
== Class Hierarchy ==
 +
 
 +
*[[CBaseEntity (CS)|CBaseEntity]]
 +
** [[CBaseDelay (CS)|CBaseDelay]]
 
*** '''CBreakable''' ''(func_breakable)''
 
*** '''CBreakable''' ''(func_breakable)''
**** [[CPushable Offset List (Counter-Strike)|CPushable ''(func_pushable)'']]
+
**** [[CPushable (CS)|CPushable ''(func_pushable)'']]
  
  
 +
== Entity Data ==
  
<tt>''W = Windows'' |</tt><tt> ''L = Linux''</tt>
+
<tt>W = Windows |</tt><tt> L = Linux</tt>
 
{| cellpadding="4"
 
{| cellpadding="4"
 
|- class="t2th"
 
|- class="t2th"
Line 20: Line 30:
 
| style="text-align:center" | Materials
 
| style="text-align:center" | Materials
 
| None.
 
| None.
 +
<pawn>
 +
enum Materials { matGlass = 0, matWood, matMetal, matFlesh, matCinderBlock, matCeilingTile, matComputer, matUnbreakableGlass, matRocks, matNone, matLastMaterial }
 +
</pawn>
 
|- class="t2td"
 
|- class="t2td"
 
| m_Explosion
 
| m_Explosion
Line 27: Line 40:
 
| style="text-align:center" | Explosions
 
| style="text-align:center" | Explosions
 
| None.
 
| None.
 +
<pawn>
 +
#define NUM_SHARDS 6 // this many shards spawned when breakable objects break;
 +
enum Explosions { expRandom, expDirected };
 +
</pawn>
 
|- class="t2td"
 
|- class="t2td"
 
| m_idShard
 
| m_idShard
Line 57: Line 74:
 
|}
 
|}
  
== Constants ==
+
 
 +
== Entity Attributes ==
 +
 
 +
* '''Name''' (''targetname'') - Property used to identify entities.
 +
* '''Material Type''' (''material'') - The type of material that a func_breakable or func_pushable should act as. Options are:
 +
: 0 = Glass
 +
: 1 = Wood
 +
: 2 = Metal
 +
: 3 = Flesh
 +
: 4 = Cinder Block
 +
: 5 = Ceiling Tile
 +
: 6 = Computer
 +
: 7 = Unbreakable Glass
 +
: 8 = Rocks
 +
* '''Spawn on Break''' (''spawnobject'') - Used by func_breakable and func_pushable. Determines what item is spawned when the entity is broken. Options are:
 +
: 0 = Nothing
 +
: 1 = Battery
 +
: 2 = Health Kit
 +
// HL only
 +
: 3 = 9mm Handgun
 +
: 4 = 9mm Clip
 +
: 5 = Machine Gun
 +
: 6 = Machine Gun Clip
 +
: 7 = Machine Gun Grenades
 +
: 8 = Shotgun
 +
: 9 = Shotgun Shells
 +
: 10 = Crossbow
 +
: 11 = Crossbow Bolts
 +
: 12 = 357
 +
: 13 = 357 Clip
 +
: 14 = RPG
 +
: 15 = RPG Clip
 +
: 16 = Gauss Clip
 +
: 17 = Hand Grenade
 +
: 18 = Tripmine
 +
: 19 = Satchel Charge
 +
: 20 = Snark
 +
: 21 = Hornet Gun
 +
* '''Render FX''' (''renderfx'') - Gives objects special render effects. Think of it as modifying whatever the Render Mode puts out. The options are as follows:
 +
: 0 = Normal
 +
: 1 = Slow Pulse
 +
: 2 = Fast Pulse
 +
: 3 = Slow Wide Pulse
 +
: 4 = Fast Wide Pulse
 +
: 5 = Slow Fade Away
 +
: 6 = Fast Fade Away
 +
: 7 = Slow Become Solid
 +
: 8 = Fast Become Solid
 +
: 9 = Slow Strobe
 +
: 10 = Fast Strobe
 +
: 11 = Faster Strobe
 +
: 12 = Slow Flicker
 +
: 13 = Fast Flicker
 +
: 14 = Constant Glow
 +
: 15 = Distort
 +
: 16 = Hologram (Distort and Fade)
 +
* '''Render Mode''' (''rendermode'') - Controls the type of rendering that is used for an object. Options are:
 +
: 0 = Normal
 +
: 1 = Color
 +
: 2 = Texture
 +
: 3 = Glow
 +
: 4 = Solid
 +
: 5 = Additive
 +
* '''Global Entity Name''' (''globalname'')
 +
* '''Target on Break''' (''target'') - When the func_breakable is activated (i.e. broken), it will activate this entity.
 +
* '''Strength''' (''health'') - The amount of damage the entity will take before breaking.
 +
* '''Gibs Direction''' (''explosion'') - Direction the gibs will go on break (0 = Random, 1 = Relative to Attack)
 +
* '''Delay before fire''' (''delay'')
 +
* '''Gib Model''' (''gibmodel'') - Model to use for gibs (overrides default specified by Material Type).
 +
* '''Expolde Magnitude''' (''explodemagnitude'') - This will determine the size of the explosion that occurs when the brush breaks. 0 = None.
 +
* '''FX Amount''' (''renderamt'')
 +
* '''FX Color''' (''rendercolor'')
 +
* '''ZHLT Lightflags''' (''zhlt_lightflags'')
 +
* '''Light Origin Target''' (''light_origin'')
 +
* '''Minimum light level''' (''_minlight'')
 +
 
 +
 
 +
== Entity Flags ==
  
 
<pawn>
 
<pawn>
enum Explosions { expRandom, expDirected }
+
// Spawn flags.
enum Materials { matGlass = 0, matWood, matMetal, matFlesh, matCinderBlock, matCeilingTile, matComputer, matUnbreakableGlass, matRocks, matNone, matLastMaterial }
+
#define SF_BREAK_TRIGGER_ONLY 1    // Only Trigger    - Entity can only be activated (broken) by being triggered.
 +
#define SF_BREAK_TOUCH 2    // Touch          - Brush will break on touch.
 +
#define SF_BREAK_PRESSURE 4    // Pressure        - Brush will break when pressured (e.g. player walking on it).
 +
#define SF_BREAK_CROWBAR 256  // Instant crowbar - Whack it with a crowbar and it will break instantly (regardless of strength).
 +
</pawn>
 +
 
 +
 
 +
== Notes ==
 +
 
 +
None.
 +
 
 +
 
 +
== HLSDK Reference ==
 +
 
 +
* [http://svn.tcwonline.org/viewvc.cgi/hlsdk/dlls/func_break.h?view=markup&root=amxmodx func_break.h]
 +
* [http://svn.tcwonline.org/viewvc.cgi/hlsdk/dlls/func_break.cpp?view=markup&root=amxmodx func_break.cpp]
 +
 
 +
 
 +
== Related Links ==
  
#define NUM_SHARDS 6 // this many shards spawned when breakable objects break;
+
* [http://twhl.co.za/wiki.php?id=164 TWHL]
</pawn>
 

Revision as of 09:35, 29 August 2009


Basic Information

  • Classname: CBreakable.
  • Inheriting Instances: func_breakable.
  • Description: The func_breakable entity allows you to create a breakable brush.


Class Hierarchy


Entity Data

W = Windows | L = Linux

Name W. Offset L. Offset L. Diff Type Description
m_Material 36 40 +4 Materials None.
enum Materials { matGlass = 0, matWood, matMetal, matFlesh, matCinderBlock, matCeilingTile, matComputer, matUnbreakableGlass, matRocks, matNone, matLastMaterial }
m_Explosion 37 41 +4 Explosions None.
#define	NUM_SHARDS 6 // this many shards spawned when breakable objects break;
enum Explosions { expRandom, expDirected };
m_idShard 38 42 +4 int None.
m_angle 39 43 +4 float None.
m_iszGibModel 40 44 +4 int None.
m_iszSpawnObject 41 45 +4 int None.


Entity Attributes

  • Name (targetname) - Property used to identify entities.
  • Material Type (material) - The type of material that a func_breakable or func_pushable should act as. Options are:
0 = Glass
1 = Wood
2 = Metal
3 = Flesh
4 = Cinder Block
5 = Ceiling Tile
6 = Computer
7 = Unbreakable Glass
8 = Rocks
  • Spawn on Break (spawnobject) - Used by func_breakable and func_pushable. Determines what item is spawned when the entity is broken. Options are:
0 = Nothing
1 = Battery
2 = Health Kit

// HL only

3 = 9mm Handgun
4 = 9mm Clip
5 = Machine Gun
6 = Machine Gun Clip
7 = Machine Gun Grenades
8 = Shotgun
9 = Shotgun Shells
10 = Crossbow
11 = Crossbow Bolts
12 = 357
13 = 357 Clip
14 = RPG
15 = RPG Clip
16 = Gauss Clip
17 = Hand Grenade
18 = Tripmine
19 = Satchel Charge
20 = Snark
21 = Hornet Gun
  • Render FX (renderfx) - Gives objects special render effects. Think of it as modifying whatever the Render Mode puts out. The options are as follows:
0 = Normal
1 = Slow Pulse
2 = Fast Pulse
3 = Slow Wide Pulse
4 = Fast Wide Pulse
5 = Slow Fade Away
6 = Fast Fade Away
7 = Slow Become Solid
8 = Fast Become Solid
9 = Slow Strobe
10 = Fast Strobe
11 = Faster Strobe
12 = Slow Flicker
13 = Fast Flicker
14 = Constant Glow
15 = Distort
16 = Hologram (Distort and Fade)
  • Render Mode (rendermode) - Controls the type of rendering that is used for an object. Options are:
0 = Normal
1 = Color
2 = Texture
3 = Glow
4 = Solid
5 = Additive
  • Global Entity Name (globalname)
  • Target on Break (target) - When the func_breakable is activated (i.e. broken), it will activate this entity.
  • Strength (health) - The amount of damage the entity will take before breaking.
  • Gibs Direction (explosion) - Direction the gibs will go on break (0 = Random, 1 = Relative to Attack)
  • Delay before fire (delay)
  • Gib Model (gibmodel) - Model to use for gibs (overrides default specified by Material Type).
  • Expolde Magnitude (explodemagnitude) - This will determine the size of the explosion that occurs when the brush breaks. 0 = None.
  • FX Amount (renderamt)
  • FX Color (rendercolor)
  • ZHLT Lightflags (zhlt_lightflags)
  • Light Origin Target (light_origin)
  • Minimum light level (_minlight)


Entity Flags

// Spawn flags.
#define SF_BREAK_TRIGGER_ONLY	1    // Only Trigger    - Entity can only be activated (broken) by being triggered.
#define	SF_BREAK_TOUCH		2    // Touch           - Brush will break on touch.
#define SF_BREAK_PRESSURE	4    // Pressure        - Brush will break when pressured (e.g. player walking on it).
#define SF_BREAK_CROWBAR	256  // Instant crowbar - Whack it with a crowbar and it will break instantly (regardless of strength).


Notes

None.


HLSDK Reference


Related Links