K... is this way any good... or should I use another

K im making a super mario game right and i’m working on the bad guys right now…

currently ill give them a predefined path and if mario walks into them or something he’ll either shrink or die, depending on his size.

anywayz… currently i was thinking of having a little line on the head of each of the bad guys and if mario touched it… the goomba’s would die…

ex of what i would put on the line of the mc on each bad guy

onClipEvent (enterFrame) {
if (mario.hitTest(_root.badguy1.hitter)) {
_root.mario._y += 6;
}
if (mario.hitTest(_root.badguy1.hitter)) {
_root.badguy1.hitter.gotoAndPlay(“goombadead”);
}
}

this is what i am gonna do now… but i know theres gotta be a better way… any suggestions

how about testing if mario hits them and he is at a certain hieght?

if(mario._y == goomba._y-goombas hieght){
goomba dies
} else {
mario dies
}
}

theory should work i guess. I dunno. just a thought

Hey ur ideas good…

just one question…

K ur first line , does it meen that if mario is above the goomba, the goomba dies (same y intercept) …?

onClipEvent (enterFrame) {
if (mario.hitTest(_root.badguy1.hitter)) {
_root.mario._y += 6;
_root.badguy1.hitter.gotoAndPlay(“goombadead”);
}
}

You mean THIS?

ya… ops forgot u could put it in…

lol my way still works but prob harder for AC…

thanks

So you’re basically saying that if mario isnt alligned on the Y axis with the goomba, he’ll die? That wont work. :hr:

Chen is right.

However… You won’t be able to put that code on EACH bad guy in the game for obvious reasons. :tb:

:pirate3:

no i put that if mario jumps on the top of the guy where the hittest is he’ll do a lil bounce…

that is what my brother is trying to say, that when u jump on the goomba mario will doa lil bounce just like in the game…

ya chen urs is the one that is right

onClipEvent (enterFrame) {
if (mario.hitTest(_root.badguy1.hitter)) {
_root.mario._y += 6;
_root.badguy1.hitter.gotoAndPlay(“goombadead”);
}
}

i’ll tell my bro to check the forums so he may see the code