Wonky Bullet Behaviors

0 favourites
  • 3 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • Hey, I'm currently working on a bullet hell game and right now I'm prototyping some bullet patterns. The events I am using are pictured below in this screenshot:

    I have multiple functions set up like this that trigger one after another for series of attacks. This usually works without a hitch but for some reason a wave of bullets will all simultaneously have their angles of motion become 0 degrees and fly off the right side of the screen. As far as I can tell, there isn't any pattern to when this happens. I figure that this is some sort of referencing/picking issue, however I don't really know a better way of writing this code, as literally all it's doing is creating bullets and setting their angles. If anyone knows what is wrong with this approach or a better way to do it, please let me know. It is also possible I just have a stray event referencing all of my bullets, so also let me know if this approach works perfectly fine for you.

    Note: I was also getting this issue with little bullets that explode into smaller fragments, but I fixed it by creating an extra fragment at the end instead of just having the event line end with the "set angle of motion" event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Each of your Bullet setting events should be a subevent of the create.

  • If everything is simultaneously flying to the right, that is the default angle of motion and it is a result of no angles being set after creation. Making subevents for each set of create and settings might be a good idea as blackhornet suggested. But from my experience setting properties after a create object action like you did generally does result in the expected picking behavior.

    Another thing to look for is any other place bullets might be getting created unintentionally without angles being set.

    Also there's a wait action, which is 90% of the time unnecessary or misused and causes unexpected behavior. Can't tell if it's a problem just from the screenshot though.

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