My Broken Game

This forum is currently in read-only mode.
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Well, in utter desperation as the competition ends tomorrow, I'm going to post my .cap for the Minimalism contest. I just cannot figure out what is wrong with it. Everything works, except for the fact that when the main character shoots, he shoots two bullets. I've tried isolating code, rewriting code, everything I can possibly think of and it just does not work. Very frustrating. Anyway, if someone wants to look it over, see if they can tell what's happening, I'd really appreciate it.

    Hmmm, in hindsight, this may be asking a bit too much... Ah well, I may have missed something obvious. But don't waste too much time or anything.

    http://dl.dropbox.com/u/1378330/aaargh.cap

  • Seems one needs the Advanced Camera plugin to open this cap.

    Oh well, I can only speculate at this point. If the bullet is duplicating, then it must be a duplicated trigger, event or action. It may not be always apparent; are you using two instances of Mouse and Keyboard object? Only one global instance is enough. Next check any conditions related to firing; perhaps it is allowing two triggers before it clams. Then check actions, sometimes it is not apparent but some people mistakenly duplicate the spawning event.

    Moreover, check if the bullet isn't in a container with another bullet, though that sounds silly by itself - objects cannot be containers of themselves.

    Just a few tips to tide you over until someone with the camera plugin can dig in.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey cow_trix, that's a cool game!

    In your base event sheet in event 39 try to substract 0.5 from ammo and not 1. That seems to work for me. Probably you would have to do the same for event 38, which I assume is when the weapon is upgraded.

    Don't ask me why that is, but I had a situation like this before and when I substraced half the amount it logically should be, it worked. Then again I don't have full overview what's going on in your events. But the change seems to make it work!

  • It may not be always apparent; are you using two instances of Mouse and Keyboard object?

    Thankyou good sir! That was indeed the problem. And thanks also PixelRebirth, that worked too (although it means the bullets do twice as much damage).

  • It may not be always apparent; are you using two instances of Mouse and Keyboard object?

    Hey, that might also explain the old bug I had in the back of my mind. If only I could figure out which cap that was and revisit it...

    Need to keep this in the back of my mind from now on!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)