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

#1 2007-07-05 13:48:24

zwitter
Scratcher
Registered: 2007-07-05
Posts: 3

shoot em up problems

hi, im making a gave soort of like mario, it has the same layout and such but in a halo theme.
my problem is this, i have it set up so i can shoot bullets at the aliens, i have it set so when i hit the button it shows, goes to the gun, then shoots in the direction i set it. with the alien i have right now it is just bouncing back and forth in a little ditch, i tried to set it so that when it was touching one of the bullet sprites it would run the animation to make it look liek it was expoloding, but when ever i shoot at it with any of the bullets they go right through and it doesnt seem to register.

if anyone has any advise on how to fix this it would be great.

Offline

 

#2 2007-07-05 15:23:43

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: shoot em up problems

Make sure you are checking the "touching sprite1" condition frequently enough.
And share your code when you are looking for debugging help, as it is very hard to debug your description of what *should* happen, without seeing your actual attempt to make it happen.

Offline

 

#3 2007-07-05 16:48:51

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: shoot em up problems

I've generally found that if your bullet checks for collision every time it moves, and the amount it moves isn't enough to take it right over the top of an enemy without touching it, then this problem doesn't occur.

Or - I might just have been lucky  wink


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

Board footer