Gold Coin Deletion Code Problem

Started by
0 comments, last by homer_3 15 years, 11 months ago
hi. Im new to games design in flash and have come across a problem that i was hoping someone could help with. My problem is this... I have tried to make a simple game where you control the player and have to collect gold coins. But after you have collected the first coin. The next ones dont seem to want to delete and it doesnt add a point to the players score. the actionscript i have got on the gold coins is this... onClipEvent(EnterFrame) { if (_root.gold2.hitTest(_root.man)) { _root.plscore = +1; _root.gold2.removeMovieClip(); } } I am not sure, however, if i should have the hittest code on the coin or on the player or anything. Im so confused as to why it isnt working. can someone please help?
Advertisement
I just looked at some docs on removeMovieClip(). It looks like it only works for dynamically created moveclips (ones that were created using AS). So if your level is already layed out on the stage with coins and all, I don't think it will work.

This topic is closed to new replies.

Advertisement