- Chaos Core
- Core
- BaseCombatWeapon
- BaseGrenade
- Documentation
- Base class for all thrown explosive/utility grenades. Explosion behaviour is driven entirely by WeaponParse fields (see ExplosionType, ExplosionRadius, etc.) and the CustomData dictionary for fuse/cook/throw tuning: CustomData keys: "fuse_time" seconds until thrown grenade explodes. Default 3.0 "max_cook_time" seconds before OnOvercooked fires. Default 4.0 "explode_on_overcook" 1 = explode in hand; 0 = auto-throw. Default 0 "throw_force" impulse magnitude applied to the live grenade. Default 1200
- Also in
Chaos Theory
Properties (15)
NameType
FuseTime
float
protected · virtual
MaxCookTime
float
protected · virtual
ExplodeOnOvercook
bool
protected · virtual
ThrowForce
float
protected · virtual
ExplosionRadius
float
protected
ExplosionDamage
float
protected
ExplosionDuration
float
protected
ExplosionMaxVoxels
float
protected
IsCooking
bool
ReadOnly
CookStartTime
float
ReadOnly
CookedSeconds
float
Seconds cooked off the fuse so far.
ReadOnly
CurrentCookedFuse
float
ReadOnly
_reloadsSingly
bool
protected · override
_isProjectile
bool
protected · override
Methods (22)
NameType
StartReload(bool _ = true)
void
protected · override
FinishReload(bool _ = true)
void
protected · override
EjectShells()
void
protected · override
CreateMuzzleFlash(bool player = true)
void
protected · override
HasGrenades()
bool
protected · virtual
OnUpdate()
void
protected · override
HandleWeaponInput()
void
protected · override
HandleWeaponStates()
void
protected · override
BeginCook()
void
Pull the pin and start the fuse burning.
protected · virtual
OnBeginCook()
void
Called the frame cooking starts.
protected · virtual
Throw()
void
Normal cook-and-release throw. Fuse is shortened by however long was cooked.
protected · virtual
QuickThrow()
void
Skip cooking entirely: full fuse, thrown immediately.
virtual
FinishAndSpawn(float fuse, float force)
void
Shared path for all throw variants: consume reserve ammo, sync HUD, then
spawn a live grenade in the world via SpawnLiveGrenade().
protected
SpawnLiveGrenade(float fuse, float force)
void
Spawns a physics grenade object in the world, waits for the
fuse to expire, then calls Explode() at its final resting position.
Override if you need custom behaviour (like sticky, bouncing, etc).
protected · virtual
ExplodeVolumetric(Vector3 origin)
void
Voxel-wave explosion, respects solid geometry occlusion.
protected · virtual
SpawnExplosionEffect(Vector3 origin)
void
Spawn the explosion related effects at a given position.
protected · virtual
OnOvercooked()
void
Player held past MaxCookTime. Either explodes in hand or auto-throws.
protected · virtual
ExplodeInHand()
void
Grenade exploded while held — spawn at player origin with zero fuse.
protected · virtual
SecondaryAttack()
void
Override per grenade type (underhand lob, roll, smoke pop, etc.)
Not triggered unless UsesSecondary() returns true on the .wpn.
protected · override
TryGetCustomData(string key, float fallback)
float
protected