Can you link to the game? I am not much ( if any ) of a coder / programmer ... but a bit of information regarding the game you are using, and I will see what I can do, or it will give others who read this thread a better understanding of what you are needing. Just asking for help on coding a game really doesn't give people much to work with and tend to lead to things like my post - asking a series of questions to get to the heart of the matter.
I program and make games too but I know to look for tutorials and game maker help forums first. Hard to help without knowing your language your using and having a Game Design Doc to look at. Also another reason you could be having issues is you are stating too big. I found that new game makers tend to start too big first and end up choking on their new idea (points at self @_@). If you don't map out your game for yourself you never really know what it is you're really needing help with and neither will anyone you ask.