Viper Snake
Member
I couldn't find any scripts here for this, so I made my own by modifying the MP limiter script. This will prevent an enemy from performing an animation based on how many are alive.
Usage: @cmd spawnlimiter <enemy limit>
Example:
The Melty Zombie from Castlevania: Harmony of Dissonance can spit out acid that creates another Melty Zombie. This script prevents the game from eventually locking up due to a massive amount of Melty Zombies on screen.

Code:
void spawnlimiter(int Limit)
{// Prevents an enemy from performing an animation if there are too many enemies alive.
// Viper Snake - 6/16/2015
void self = getlocalvar("self");
int spawnMAX = openborvariant("count_enemies"); //How many enemies?
int y = getentityproperty(self,"a"); //Get entity's altitude
int b = getentityproperty(self, "base"); //Get entity's base
if(spawnMAX>=Limit) //Enemy limit reached?
{
if(y > b) // Mid air?
{
changeentityproperty(self, "animation", openborconstant("ANI_JUMP") );
} else{
setidle(self); //Don't play the animation
}
}
}
Usage: @cmd spawnlimiter <enemy limit>
Example:
The Melty Zombie from Castlevania: Harmony of Dissonance can spit out acid that creates another Melty Zombie. This script prevents the game from eventually locking up due to a massive amount of Melty Zombies on screen.
Code:
anim attack2
@cmd spawnlimiter 10
delay 10
range 220 260
loop 0
offset 64 84
bbox 32 14 92 70
attack7 30 12 92 72 10 0 0 1 0 0
move 0
frame data/chars/melty_zombie/8.png
attack7 0 0 0 0 0 0 0 0 0 0
bbox 36 12 92 72
offset 66 84
frame data/chars/melty_zombie/11.png
attack7 34 8 94 76 10 0 1 0 0 0
bbox 36 10 94 74
offset 64 84
frame data/chars/melty_zombie/12.png
attack7 0 0 0 0 0 0 0 0 0 0
bbox 36 4 102 80
frame data/chars/melty_zombie/13.png
attack7 34 2 102 82 10 0 0 1 0 0
@cmd spawn01map "melty_zombie_spit" 80 30 0
frame data/chars/melty_zombie/14.png
attack7 0 0 0 0 0 0 0 0 0 0
bbox 36 10 94 74
frame data/chars/melty_zombie/12.png
delay 5
attack7 32 10 94 74 10 0 0 1 0 0
bbox 36 12 92 72
offset 66 84
frame data/chars/melty_zombie/11.png
attack7 0 0 0 0 0 0 0 0 0 0
frame data/chars/melty_zombie/11.png
