goomba help

Non-platform specific questions.

goomba help

Postby Waluigiftw » Sat Sep 25, 2010 4:27 am

HELP
im having some trouble with my goombas
whenever the original mario landed on top of a goomba he would bounce up,the goomba would be flat and mario would escape unscathed.
however in my game im using a health aspect and my character will lose health upon collision with right or left side of goomba
whenever my character collides with a goomba even when its directly above it he still takes damage and sometimes the goomba doesnt even die! :evil:
*same thing for koopa*
yvelocity = yvelocity - 4;
*thats all i have in the player collide -> topside of actor gooba repeat yes*

CreateTimer("Event Actor", "goomba_die", 3000);
points.textNumber = points.textNumber +10;
ChangeAnimation("Event Actor", "goombaflat", FORWARD);
change_dir = 2;
*thats what i have in the goomba collide with bottom side of player repeat no*

and heres a picture of my goomba(if it helps)
Attachments
Super Flash Mario-671 - Copy.png
i thought that the goomba was too small...
Super Flash Mario-671 - Copy.png (1.4 KiB) Viewed 1087 times
User avatar
Waluigiftw
 
Posts: 61
Joined: Mon Sep 06, 2010 2:49 pm
Location: Fox lake
Score: 3 Give a positive score

Re: goomba help

Postby zxcvbnm » Sat Sep 25, 2010 7:49 am

No problem , I made a super mario demo for you .
Controls
left arrow=move left
rigth arrow=move right
space bar= mario jump

Ok when you stomp on goomba head , you bounce off and goomba dies.
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 248
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score

Re: goomba help

Postby Bee-Ant » Sat Sep 25, 2010 12:27 pm

Goomba -> Collision -> Bottom side of Mario :

1. If you have "canjump" variable as Actor variable
Code: Select all
if(collide.canjump==0) //Mario is jumping
{
    //Kill the Goomba here
}

2. If you have "canjump" variable as Global variable
Code: Select all
if(canjump==0) //Mario is jumping
{
    //Kill the Goomba here
}


Then fix your code on Mario -> Collision -> Left or Right side of Goomba to:
Code: Select all
if(canjump==1) //Mario is landing
{
    //Decrease Mario health here
}
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: goomba help

Postby SuperSonic » Sat Sep 25, 2010 1:30 pm

You could try making a "filled region" actor, making it the same size as your gooma, set the goomba as the parent of the filled region, then change the collision event.
Look at the attachement to see what I mean
Attachments
CaveMan.zip
(42.04 KiB) Downloaded 71 times
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: goomba help

Postby Waluigiftw » Sat Sep 25, 2010 11:40 pm

ok thanks everyone its working now :mrgreen: :mrgreen: :mrgreen: :mrgreen:
everyone input helped(i kinda used a combo of all of them :D
User avatar
Waluigiftw
 
Posts: 61
Joined: Mon Sep 06, 2010 2:49 pm
Location: Fox lake
Score: 3 Give a positive score

Re: goomba help

Postby zxcvbnm » Sat Sep 25, 2010 11:43 pm

I havent tryed the code yet but if that works bee-ant , your a genius!!!
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 248
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score

Re: goomba help

Postby savvy » Sun Sep 26, 2010 6:34 pm

you could even use on the goomba:
Code: Select all
if(collide.y<y-height/2)
{
change to death
yvelocity=-8;
}
else
{
hp-=bleh;
}

that could help too
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest