Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


nickem

Member Since 14 Sep 2005
Offline Last Active Nov 20 2012 07:02 PM

#4957867 How to code bullets in side scroller

Posted by nickem on 10 July 2012 - 08:53 PM

It's because bullet1 is declared locally, resulting in it being in the same spot every time. (Well, that's what it looks like anyway)

I would create a list of bullets and add them as they're fired, update them every frame, and destroy them when no longer needed(ie collision)


PARTNERS