I've been mentioning this particular project of mine a couple times, but I'm currently working on a Custom Boss Kit. No, it isn't for me. I plan on learning how to script ghosted enemies. It's intended for people who don't know how to script yet still want custom bosses in their quest. Here's what I have so far:
import "std.zh" import "stdExtra.zh" import "ffcscript.zh" ffc script BossMaker{ void run(int EnemyMove, int EnemyFire, int EnemyColl){ Waitframes(4); while(true){ npc n1 = Screen->LoadNPC(EnemyMove); //Load enemy data used for appearance and movement if(!n1->isValid()){ Quit(); } npc n2 = Screen->LoadNPC(EnemyFire); //Load enemy data used for behavior and weapon fire if(!n2->isValid()){ Quit(); } npc n3 = Screen->LoadNPC(EnemyColl); //Load enemy data used for collision and touch effects if(!n3->isValid()){ Quit(); } n2->X = n1->X; //Weapon enemy X-Coordinate attached to Movement enemy n2->Y = n1->Y; //Weapon enemy Y-Coordinate attached to Movement enemy n3->X = n1->X; //Collision enemy X-Coordinate attached to Movement enemy n3->Y = n1->Y; //Collision enemy Y-Coordinate attached to Movement enemy n1->CollDetection = false; //Movement enemy collision detection turned off n2->CollDetection = false; //Weapon enemy collision detection turned off if(n3->HP <= 0){ //If Collision enemy's HP reaches zero n1->HP = 0; //Set Movement enemy's HP to zero n2->HP = 0; //Set Weapon enemy's HP to zero } } } }
However, I've found that it doesn't work, and I can't figure out why. What it's meant to do is take three different enemies, one for movement and graphics, one for firing EWeapons, and one for collision data, and overlap them on top of each other every frame. Finally, when the collision enemy is killed, the other two die as well. That way, it would look as though you had one enemy with the combined traits of three. For instance, a Keese that shoots fireballs and eats Link if it makes contact.
That's actually what I was using to test it. I used a Keese as enemy 1 (movement/graphics) and a fireball shooter as enemy 2 (weapon fire). For some reason, it's not attaching the shooter to the Keese. I've looked over everything and it should be working. Any ideas why? Once I get this working, I can start incorporating other scripts like the BigEnemy script so they actually look like bosses instead of common enemies.