Re: Custom Bosses and You
Don't get too excited. For the simple CE scripts, you still need to tell the enemy how to move around. So there's still a little scripting going on. But the graphics and size are entirely dependent on what FFCs you assign, as the script headers explain. All you have to do is assign the scripts with the right Data fields, set up your FFCs, and change the script dealing with the enemy movement only, and you're done. Right now, the following enemies have simple CE scripts:
bouncer_CE = The blue flea things from Zelda 2, appear in Scorpio.
diamond_CE = The crystals that bounce off of the walls in Gemini and Libra.
crawlie_CE = Crawls along the ground towards the player, hops up small ledges, fires Swords.
And a bunch more I'm not remembering now. I'll go post the code tonight.
Re: Custom Bosses and You
Good stuff.
As you know I have a particular sort of aversion torwards the code involving trigonometry parameters, so, could you explain this part to me? Undoubtedly the most complicated part for most people. ie: me. ;)
Code:
if((i<=36+first_projectile_enemy_number)&&(i>18+first_projectile_enemy_number)){
current_enemy->X = attack_X + (attack_radius*Cos(5+(i-first_projectile_enemy_number)*20))/2;
current_enemy->Y = attack_Y + (attack_radius*Sin(5+(i-first_projectile_enemy_number)*20))/2;
}
So which one of those changes what, and how about making each wave more than 18 bullets spaced out, or making them faster/slower, changing where the circle starts, etc.?
Re: Custom Bosses and You
Cool! Just one question on the movement section:
Code:
body1->X = this_ffc->X-16;
Why doesn't this make the movement jerky, suddenly hopping 16 pixels at a time? Or does it?
Re: Custom Bosses and You
What it does is lock the graphics in place, so as the ffc moves, the "body" of the enemy moves with it. Although it should be pointed out that Large FFCs work just as well for giving *most* scripted bosses a body...if you're tight on ffcs. I also figured out my above post a while back. I think I missed th *20 bit. That's a really cool attack and much easier than what I was doing. You've outdone yourself again.
Re: Custom Bosses and You
Gleeok's got it right.
The way I script enemies, only ONE FFC is actually moving around using Vx and Vy. It's this_ffc. Every other FFC making up the boss does not move around itself. Instead, it is locked into place relative to this_ffc. So if the body of the boss is made up of 6 FFCs, I figure where they need to be (one is at this_ffc->X - 16, this_ffc->Y-16, next one is at this_ffc->X, this_ffc->Y -16, et cet.)
The script you're looking at here uses three FFCs for the boss' body graphics. One large FFC for a single static picture, and two 1x1 ffcs that animate and make up the boss' tentacles. Every frame, after this_ffc moves, these body ffcs get moved into position and set to the right tile/combo.
-C
Re: Custom Bosses and You
Okay, I gotcha. It isn't saying move the FFC -16, its saying place the FFC -16 relative to the main. Got it.