Excuse my language, I'm just very confused. For some reason my enemy's shadow is being drawn above the enemy itself rather than below:
I have no clue what's causing this. I even tried setting the "behind" flag on the shadow sprites. Here's the code:
ffc script PracticeEnemy { void run(int enemyID) { int haltTime = 48; float counter = -1; npc ghost = Ghost_InitAutoGhost(this, enemyID); float MaxHP = Ghost_HP; float StepSpeed = ghost->Step; bool PhaseTriggered[2]; int Phase = 0; // Starts at 0 because it's better to and you know it Ghost_SetSize(this, ghost, 2, 2); Ghost_SetFlag(GHF_4WAY); Ghost_SetFlag(GHF_SET_OVERLAY); while(true) { if(Phase == 0) { counter = Ghost_HaltingWalk4(counter, StepSpeed, ghost->Rate, ghost->Homing, ghost->Hunger, ghost->Haltrate, haltTime); if(counter == haltTime*(2/3)) { FireEWeapon(EW_ARROW, Ghost_X, Ghost_Y, RadianAngle(Ghost_X, Ghost_Y, Link->X, Link->Y), 200, ghost->WeaponDamage, -1, -1, 0); } if(PhaseTriggered[Phase] == false) { if(Ghost_HP < MaxHP/2) { StepSpeed = StepSpeed * 2; // Arbitrary multiplication ghost->CSet = 10; PhaseTriggered[Phase] = true; Phase = Phase + 1; // So we don't go through the same phase over and over XD } } } if(Phase == 1) { counter = Ghost_ConstantWalk4(counter, StepSpeed, ghost->Rate, ghost->Homing, ghost->Hunger); if(Ghost_Z == 0) { Ghost_Jump = 2; } } Ghost_Waitframe(this, ghost, true, true); } } }
(I think I may have overly complicated the boss phases with PhaseTriggered[], but I figured I'd keep it in there for now since it still works.)
Also, since I'm making an ENTIRE TOPIC, I figured I might as well also ask for general tips for using ghost.zh.