[SOLVED] Enemies not dying until a knockdown+damage feature/value?

Mr.Q!

Well-known member
I was looking for something like this in the manual but couldn't find it. Is it possible by now? In the Double Dragon games, enemies don't die until you they get a knockdown even if they have 0 energy left, so since openbor allows to knockdown enemies even by having a '0' damage value, is it possible to kill an enemy by a combination of both avobe 0 damage value + knockdown?
 
Bloodbane said:
Ack, looks like openborconstant("ATK_BOSSDEATH") is not yet supported :(.
Indeed. It just exists on the newer build, which wasn't released yet:

    // For engine and script use. These are
    // applied automatically by various
    // conditions or intended for script logic.
    ATK_BOSS_DEATH, // KO leftover enemies when boss is defeated.
    ATK_ITEM,      // Scripting item logic. Item "attacks" entity that collects it.
    ATK_LAND,      // Touching ground during a damage on landing fall.
    ATK_LIFESPAN,  // Entity's lifespan timer expires.
    ATK_LOSE,      // Players (with lose animation) when level time expires.
    ATK_PIT,        // Entity falls into a pit and reaches specified depth.
    ATK_TIMEOVER,  // Players (without lose animation) when level time expires.

By the way, its ATK_BOSS_DEATH and not ATK_BOSSDEATH.
 
ATK_BOSS_DEATH isn't all that new. I honestly don't recall when I put it in, but it's been some time.

But if your build is too old to use it, there's still a way. Check for the entity that caused damage (the "attacker" local var in a take damage event). When the damage comes from an engine routine and not directly from an entity, this variable will be NULL.

Not quite as elegant as checking attack type, but should do the job.

DC
 
Damon Caskey said:
ATK_BOSS_DEATH isn't all that new. I honestly don't recall when I put it in, but it's been some time.

It's not available on the last release. I remember I checked the source I have at my job (from the time I fixed the overlapping fps I'm debug mode) and it's not there.
 
I've tried the workaround and it didn't work :(
Somehow the script decides that death on boss death is acceptable, or maybe I coded it wrong

However, I just got another idea. Instead of modifying the script, why not change how to kill all enemies on boss' death? I have script system to replicate the slow down+kill all enemies for that. Since that script specifies the attack type when killing all enemies, I could easily add that in the takedamagescript

Even better, this script system can be expanded or modified to order other enemies to flee after boss' death
 
Bloodbane said:
I've tried the workaround and it didn't work :(
Somehow the script decides that death on boss death is acceptable, or maybe I coded it wrong

However, I just got another idea. Instead of modifying the script, why not change how to kill all enemies on boss' death? I have script system to replicate the slow down+kill all enemies for that. Since that script specifies the attack type when killing all enemies, I could easily add that in the takedamagescript

Even better, this script system can be expanded or modified to order other enemies to flee after boss' death

yup that would be neat
 
Back
Top Bottom