CODE
ffc script Goomba{
void run(int enemyID){
npc ghost = Ghost_InitAutoGhost(this, enemyID, GHF_NORMAL);
int counter = -1;
int step = ghost->Step;
int rate = ghost->Rate;
int homing = ghost->Homing;
int haltrate = ghost->Haltrate;
int zheight = ghost->Attributes[4];
while(true){
counter = Ghost_HaltingWalk4(counter, step, rate, homing, 0, haltrate, 48);
if(Link->Jump < 0 && Link->Z <= zheight){
if(XYCollision(ghost) && CanSquash(ghost->Attributes[3])){
Game->PlaySound(ghost->Attributes[0]);
ghost->CollDetection = false;
Ghost_Data++;
if(ghost->Attributes[5]) Link->Jump = 3;
Ghost_Waitframes(this, ghost, true, true, ghost->Attributes[1]);
ghost->ItemSet = ghost->Attributes[2];
Ghost_HP = HP_SILENT;
}
}
Ghost_Waitframe(this, ghost, true, true);
}
}
bool XYCollision(npc n){
int ax = Link->X + Link->HitXOffset;
int bx = n->X + Link->HitXOffset;
int ay = Link->Y + Link->HitYOffset;
int by = n->Y + Link->HitYOffset;
return RectCollision(ax, ay, ax + Link->HitWidth, ay + Link->HitHeight, bx, by, bx + n->HitWidth, by + n->HitHeight);
}
bool CanSquash(bool boots){
if(Link->Item[I_STOMPBOOTS]) return true;
else return !boots;
}
}
This is the Goomba Script originally written by blackbishop. The problem is, although I have the enemy type set to 'Other' and not 'Other (Floating)', it still does not obey sideview gravity, for it floats in sideview when it should be falling in sideview.

