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
system
2
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
system
3
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) …?
system
4
onClipEvent (enterFrame) {
if (mario.hitTest(_root.badguy1.hitter)) {
_root.mario._y += 6;
_root.badguy1.hitter.gotoAndPlay(“goombadead”);
}
}
You mean THIS?
system
5
ya… ops forgot u could put it in…
lol my way still works but prob harder for AC…
thanks
system
6
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:

system
7
no i put that if mario jumps on the top of the guy where the hittest is he’ll do a lil bounce…
system
8
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