Func breakable

## Description

Causes a bmodel to be breakable and project fx and pieces.

## Spawnflags

INVINCIBLE - Can only be broken by being used.

IMPACT - Does damage on impact.

CRUSHER - Won't reverse movement when hit an obstacle.

THIN - Can be broken by impact damage, like glass.

SABERONLY - Only takes damage from sabers.

HEAVY\_WEAP - Only takes damage by a heavy weapon, like an emplaced gun or AT-ST gun.

USE\_NOT\_BREAK - Using it doesn't make it break, still can be destroyed by damage.

PLAYER\_USE - Player can use it with the use button.

NO\_EXPLOSION - Does not play an explosion effect, though will still create chunks if specified.

## Keys & Values

targetname - Entities with matching target will fire it.

paintarget - Target to fire when hit (but not destroyed).

wait - How long minimum to wait between firing pain target each time hit.

delay - When killed or used, how long (in seconds) to wait before blowing up (none by default).

model2 - .md3 model to also draw.

target - All entities with a matching targetname will be used when this is destroyed.

health - Default is 10.

numchunks - Multiplies the number of chunks spawned. Chunk code tries to pick a good volume of chunks, but you can alter this to scale the number of spawned chunks. (default 1) (.5) is half as many chunks, (2) is twice as many chunks.

chunksize - Scales up/down the chunk size by this number (default is 1)

playfx - Path of effect to play on death.

\_lightmapscale - Floating point value scaling the resolution of lightmaps on bru

## Entity Code

```
/*QUAKED func_breakable (0 .8 .5) ? INVINCIBLE IMPACT CRUSHER THIN SABERONLY HEAVY_WEAP USE_NOT_BREAK PLAYER_USE NO_EXPLOSION NO_SABERTHROW_DMG SHOW_DAMAGE
INVINCIBLE - can only be broken by being used
IMPACT - does damage on impact
CRUSHER - won't reverse movement when hit an obstacle
THIN - can be broken by impact damage, like glass
SABERONLY - only takes damage from sabers
HEAVY_WEAP - only takes damage by a heavy weapon, like an emplaced gun or AT-ST gun.
USE_NOT_BREAK - Using it doesn't make it break, still can be destroyed by damage
PLAYER_USE - Player can use it with the use button
NO_EXPLOSION - Does not play an explosion effect, though will still create chunks if specified
=======MOVIE BATTLES II SPECIFIC SPAWNFLAG===========
SHOW_DAMAGE - Displays damage dealt to it in form of floating numbers
=======MOVIE BATTLES II SPECIFIC SPAWNFLAG===========

When destroyed, fires it's trigger and chunks and plays sound "noise" or sound for type if no noise specified

"targetname" entities with matching target will fire it
"paintarget" target to fire when hit (but not destroyed)
"wait"		how long minimum to wait between firing paintarget each time hit
"delay"		When killed or used, how long (in seconds) to wait before blowing up (none by default)
"model2"	.md3 model to also draw
"target"	all entities with a matching targetname will be used when this is destoryed
"health"	default is 10
"numchunks" Multiplies the number of chunks spawned.  Chunk code tries to pick a good volume of chunks, but you can alter this to scale the number of spawned chunks. (default 1)  (.5) is half as many chunks, (2) is twice as many chunks
"chunksize"	scales up/down the chunk size by this number (default is 1)
"playfx"	path of effect to play on death
=======MOVIE BATTLES II SPECIFIC KEY/VALUE===========
"dmgcolor"	color of floating numbers when it receives damage (ONLY IF SHOW_DAMAGE IS ENABLED)
"dmgsize"	size of floating numbers when it receives damage (ONLY IF SHOW_DAMAGE IS ENABLED)
"dmgduration" duration in milliseconds of floating numbers when it receives damage (ONLY IF SHOW_DAMAGE IS ENABLED)
=======MOVIE BATTLES II SPECIFIC KEY/VALUE===========

"showhealth" if non-0, will display the health bar on the hud when the crosshair is over this ent (in siege)
"teamowner" in siege this will specify which team this thing is "owned" by. To that team the crosshair will
highlight green, to the other team it will highlight red.

Damage: default is none
"splashDamage" - damage to do
"splashRadius" - radius for above damage

"team" - If set, only this team can trip this trigger
	0 - any
	1 - red
	2 - blue

Don't know if these work:
"color"		constantLight color
"light"		constantLight radius

"material" - default is "0 - MAT_METAL" - choose from this list:
0 = MAT_METAL		(basic blue-grey scorched-DEFAULT)
1 = MAT_GLASS
2 = MAT_ELECTRICAL	(sparks only)
3 = MAT_ELEC_METAL	(METAL2 chunks and sparks)
4 =	MAT_DRK_STONE	(brown stone chunks)
5 =	MAT_LT_STONE	(tan stone chunks)
6 =	MAT_GLASS_METAL (glass and METAL2 chunks)
7 = MAT_METAL2		(electronic type of metal)
8 = MAT_NONE		(no chunks)
9 = MAT_GREY_STONE	(grey colored stone)
10 = MAT_METAL3		(METAL and METAL2 chunk combo)
11 = MAT_CRATE1		(yellow multi-colored crate chunks)
12 = MAT_GRATE1		(grate chunks--looks horrible right now)
13 = MAT_ROPE		(for yavin_trial, no chunks, just wispy bits )
14 = MAT_CRATE2		(red multi-colored crate chunks)
15 = MAT_WHITE_METAL (white angular chunks for Stu, NS_hideout )
16 = MAT_SNOWY_ROCK	 (mix of gray and brown rocks)

Applicable only during Siege gametype:
teamnodmg - if 1, team 1 can't damage this. If 2, team 2 can't damage this.

*/

```