AAAAAAAHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!
So maney things are wrong here.
ATTACKING
1) Missle state is longrange attack.
2) Melee state is close and personal attack.
3) Or they're interchangeable. I forgot.
Having state 0 is stuped. Use your seestate if you don't wan't an attack.
PAIN
The actual hitting hurts the badguy, not the state. Painstate plays a sound affect.
I use move relative direction: 180 for 2 reasons
1) If the player moves back, why not the boss?
2) It keeps the player from bouncing on top of the boss and winning easy. This happens a-lot with Double jump characters like SS64.
MOVING
The 3 major states used for moving are A_Chase, A_Skullatack, and A_Moverelative/absolute.
1) A_Chase works like A_Fireshot. It only happens once per state. For a state that long, something else should be considerd. Unless you like you boss flowting vulnerable in the air. Uses speed variable.
2) A_Skullattack is upredictable. It works best in tiny arenas surrounded by large expanses of death-pit. Your boss will bouce off walls, and be hard to catch, but no threat. If your boss has a large deathpit to move in, he will bounce around, out of site, building speed, untill it comes out of no-whear and hopfully strikes sonic unexpecidly, unless Sonic is jumping or spinning.
3) A_Moverelative is the most reliable, constant form of propultion, with maney functions. Use this often. It is slightly predictable though.
4) None of these can hur the player, without spike-balls or turret-fire.
TARGETING
Just checking the boss flag is enough. A_look is unnesacary. Bosses can think for themselves, and appreciate being able to target who they want.
I can't do anything about the level-ending thing without the level, and I'll look at it, but that isn't my main concern.