In Nightmare mode your health degenerates. How can I implement this?
I noticed there was a "deplete_armor" but no function for health anywhere.
I noticed there was a "deplete_armor" but no function for health anywhere.
One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371
idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu/*
============
idMoveableItem::Gib
============
*/
void idMoveableItem::Gib( const idVec3 &dir, const char *damageDefName ) {
// spawn smoke puff
const char *smokeName = spawnArgs.GetString( "smoke_gib" );
if ( *smokeName != '\0' ) {
const idDeclParticle *smoke = static_cast<const idDeclParticle *>( declManager->FindType( DECL_PARTICLE, smokeName ) );
gameLocal.smokeParticles->EmitSmoke( smoke, gameLocal.time, gameLocal.random.CRandomFloat(), renderEntity.origin, renderEntity.axis );
}
// remove the entity
PostEventMS( &EV_Remove, 0 );
}
/*
============
idActor::Gib
============
*/
void idActor::Gib( const idVec3 &dir, const char *damageDefName ) {
// no gibbing in multiplayer - by self damage or by moving objects
if ( gameLocal.isMultiplayer ) {
return;
}
// only gib once
if ( gibbed ) {
return;
}
idAFEntity_Gibbable::Gib( dir, damageDefName );
if ( head.GetEntity() ) {
head.GetEntity()->Hide();
}
StopSound( SND_CHANNEL_VOICE, false );
}
/*
=====================
idActor::SpawnGibs
=====================
*/
void idActor::SpawnGibs( const idVec3 &dir, const char *damageDefName ) {
idAFEntity_Gibbable::SpawnGibs( dir, damageDefName );
RemoveAttachments();
}