import "std.zh" const int HP_DEAD = -999; //Enemy has been counted for Points (don't touch) ///////////////////////////////////////////////// //Import mandatory script headers and packages.// ///////////////////////////////////////////////// //import "ffcscript.zh" //import "string.zh" //import "ghost.zh" //import "ghost_legacy.zh" //import "cv_std_extra_MM.zh" //////////////////////////////////////////////////////////////////// //Set up environment, Base Ints, Consts, Floats, Bools, Vars, etc.// //////////////////////////////////////////////////////////////////// const int SFX_ERROR = 65; //In case you want an error SFX const int SFX_SUBWEAPON = 66; //In case you want an error int healsfx = 39; //Sound effect to play when Link is healed int errorsfx = 65; //Sound effect to play when Link's HP is full or MP is empty const int LW_MISC_TIMEOUT = 7; //////////////////////////////////////////////////////////////// // Engine Constants. /////////////////////////////////////////// //////////////////////////////////////////////////////////////// /////////////////////////////////// // Global Script ////////////////// /////////////////////////////////// global script Active { void run() { while (true) { explodeEnemies(); Waitframe();} } } void explodeEnemies(){ for ( int i = 0; i < Screen->NumNPCs(); i++ ){ npc enem = Screen->LoadNPC(i); if ( enem->Attributes[11] == 0 //If not an AutoGhost enemy && enem->Attributes[10] > 0 //Attribute 11 more than 0 && enem->HP <= 0 //And dead && enem->HP > HP_DEAD //But not counted dead by this script ){ enem->HP = HP_DEAD; //Count it dead eweapon explosion = CreateEWeaponAt(EW_BOMBBLAST, enem->X, enem->Y); explosion->CollDetection = false; } } } ////////////////////////////////////////////////////////////////////////////////// // To make an Enemy EXPLODE!: Set Misc Attr 11 to '1' and Misc. Attr 12 to '0'. // // Script from MoscowModder, 14th April 2013 //////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////// /// END GLOBAL SCRIPT ////////////// //////////////////////////////////// //import "cv_changescreen.z" //import "cv_points.z" //import "cv_subweapon.z" //import "cv_ra_enemy.z" //import "cv_enemy_points.z" //import "cv_solid_NPC_v3.z" //import "gc_solid_FFC_for_enemies_only.z" //import "cv_giveitem.z" //import "cv_flash.z" //