Bullets direction based on player's angle

0 favourites
  • 6 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • I making some tests. Making a top view shooter (picture the bird's eye view stages on Contra), but I have a problem, I want the bullets to go in the direction the player is pointing its gun.

    I managed to make them change their angle so they move in the desired direction, but if I move the player (rotation) then all the bullets on screen change their angle as well.

    Is there a way to make the bullet angle change only when it first spawns or at least treat all bullets as separate instances instead of a whole?

  • It seems u having problem to select only the the bullet it going to spawn.

    can u show me the event you did to make it change it's angle?

  • Right now it is kind of working although not that elegant of a fix. It looks like this (the object now has custom movement behavior)

    Bullet|Visible -> Accelerate X to Player.Angle...

    Its seems that because of the delay that acceleration causes in the object's movement it has no time to change angle when the player does.

  • Try using

    "Trigger once" and "for each"

    For each Bullet trigger once set to angle

    This should do it

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • After the action "Create bullet", "Set angle" to bullet and it will automaticly pick (and only pick) the newly created bullet, without needing any other filter.

    You also don't need "Trigger once" or "For each".

    In doubt, post your capx and be sure to check the examples already listed in the how do I FAQ, shooting has been covered more than once.

  • Saw one of the examples, the one with lasers and it made the trick, thx man. I have to read the examples more thoroughly

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