Help! Shooter Games

I was just looking at the the tutorial in the tutorial section on how to make a shooter. That’s easy enough…The thing I want to know is how would you make it so that when you shoot a bullet and it hits a target, that target explodes, and if one of the targets where to hit you(the mc shooting the bullets) what would you need to do to make the movie go to a game over frame. I know it involves hittest, but that’s about it. Any help will be greatly appreciated. Thanks.:cool:

Yep, you got the right idea. Here is a hitTest tutorial:

http://www.kirupa.com/developer/actionscript/hittest.htm

If you can understand that tutorial you might be able to figure out how to get the shooter working… good luck. If you need more help then post back.

Oh thanks a lot…I 'll go fiddle around, see if I can come up with something.

I tried adding on to the fire_tutorial(from tutorial section here on Kirupa) but just ended up screwing it up…I’ve attached my modified version. What I basically want to happen, is that when I fire the star(my bullet) from the crab and it intersects with the Target MC, I want the Target MC to go to it’s second frame and play! Someone please tell me what’s wrong!Thanks.

Anyone?..I really need to know this!

i didn’t check the fla so the answer may be mmuch more difficult then this, but doesn’t gotoAndPlay work!?

works now, just syntax problems and you had not actually drawn different graphic states of the circle so you wouldnt see the diiference…

Thanks a lot mlk design and everyone else who tried to help! Wow…hehe must go tinker around…Thanks a lot!!!:beam::beam::beam::beam::beam:

Grrr…one problem…If i make copies of my target and shoot them…only the original works…why…? The code doesn’t change…it keeps the same instance name “target”…what’s going on!

wait what’d you mean? you manually copied them ? or you duplicated them using AS?

Manually copied so I could have more targets to shoot at and only the original works!Why!Help! Please anyone!

EDIT:

It would be good to find out how to do it with actionscript though…might be easier than manually doing it…

that is because everything can only have one single instance name, and so it doesn’t work. but, using the duplicateMovieClip method, you can check it in your actionscript dictionary, it can be done. I don’t have time to do it for you now because i have lots of work, but in about 2 days i’ll try and if you still havn’t got it :slight_smile:

I think I get what you mean…thanks blah-de-blah. I’ll go look at it in the AS dictionnary…

oh yea, can you post your fla so i can work from that when i have time if you still don’t get it that is…thank you :slight_smile:

Ok thanks Blah de Blah. Here’s the source file. If you could show me how to make a score thing too so that when I hit one of the targets it adds so many points to my score. I know it ties in to the score tutorial here, but I have no idea how to pull that together with what I’m doing…anyways thanks in advance blah de blah :).

EDIT

One other thing I forgot to mention. How would I get it so that if my crab, the player, not the bullet, hittested with one of the targets, the main timeline would go to frame two, where my game over msg is displayed. I tried putting this hitTest script in my target but I get errors…I dunno. Here’s the script I was using:

[AS]onClipEvent (enterFrame) {
if (_root.this, hitTest(_root.crab)) {
_root.target.gotoAndPlay(2);
}[/AS]

Makes sense to me… ‘this’ refers to target and crab is the instance name given to my player. Oddly enough the crab doesn’t appear blue even though it is a valid instance name!..HELP!

good luck with your shooter

I am very interested in other peoples designs so when you are done if you would give me a link and show it to me i would be very greatfull

blah de blah you there…see my other post plz.

hello…just posting to bring this back to the front…

Someone…Anyone just help me!!!..I’m so close to figuring this out…this is driving me nuts!!!