How do I Make a bullet track the player for 2 seconds

0 favourites
  • 3 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I have a problem, I'm trying to make a "top down" game where bullets track the player for 2 seconds but with how I have it set up right now the first one only tracks the player and then zoom off of the map (Which is what i want) but then everything else will just go in a straight line...

    any fixes/ suggestions?

  • Hey Jayyyyde!

    Not sure that's what you need. In this capx you can control the player with the arrows. The cannon will shoot a bullet every 3 seconds. Each bullet will follow the player for 2 seconds, then, stays in a straight line until it leaves the layout. Bullet speed is slightly higher than player speed.

    https://www.dropbox.com/s/cnzjg4i94epg9 ... .capx?dl=0

    Hope this helps. Cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Jayyyyde ,

    If only the first bullet behaves how you want it, and then all other subsequent bullets do not, there must be an error in your event.

    I'm not sure how your game looks like, but like this without too much information I would use a pathfinding behavior, and use this event :

    bullet => On created => find path to "player.X player .Y"

    Then, for the 2 second timer, I would also ad a "bullet" behavior at your bullets that activates after 2 second while you deactivate the pathfinding behavior via the "set enabled/disabled" setting.

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