This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-04-10 09:30:33

kungpowch1ken
New Scratcher
Registered: 2012-04-08
Posts: 6

goomba smashing

Hey! All you mario game makers! What is the easiest way to kill a goomba, but if you touch him on the side you die?

Offline

 

#2 2012-04-10 09:33:21

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: goomba smashing

I'd recommend keeping track of your previous location, and if you come from above, he dies, and if from the side, you do.

Offline

 

#3 2012-04-10 09:50:18

kungpowch1ken
New Scratcher
Registered: 2012-04-08
Posts: 6

Re: goomba smashing

the goombas are moving so I can't really do that. I thought maybe I could have a second sprite (mostly invisible) do the same thing a the first and when it's touch it sends a broadcast, would that work?

Offline

 

#4 2012-04-10 09:52:44

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: goomba smashing

I think even if the goombas are moving you could do that. Just check where its position is, and if it moved, you die.

Offline

 

#5 2012-04-11 12:47:34

kungpowch1ken
New Scratcher
Registered: 2012-04-08
Posts: 6

Re: goomba smashing

any other possible suggestions ( I ant to try a variety of solutions)

Offline

 

#6 2012-04-11 13:16:35

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: goomba smashing

try

forever if <touching [goomba v]?>
 if <color [#6e5641] is touching [#6e5641]?> //mario's brown shoes are touching a brown goomba
  broadcast [killgoomba v]
 else
  broadcast [damaged v]
 end

Last edited by joefarebrother (2012-04-11 13:16:54)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#7 2012-04-12 21:49:02

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: goomba smashing

If you can determine how many Y-units the goomba is tall, and then post a script that says, if mario is touching goomba and y>however tall the goomba is, then a broadcast is sent, saying the goomba dies. Then under it, put another if block, that says, if mario is touching goomba, and y<however tall the goomba is, damage mario. This should work.


Why are the secret organizations getting all the attention?  mad

Offline

 

#8 2012-04-15 14:43:36

chipguy
Scratcher
Registered: 2009-09-09
Posts: 500+

Re: goomba smashing

sci seems to know what he's doing. if you are using something related to y-velocity for gravity, then you can make mario bounce off him.


http://scratch.mit.edu/static/projects/chipguy/2919121_sm.png by yours truly  big_smile

Offline

 

Board footer