How do I move bullets to nearest enemy?

0 favourites
  • 6 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • Hello, I try to create a tower defence game and meet an issue. I want to add a multishot tower and I did it, but bullets fly to another tower

  • Try changing your code like this:

    Every 0.5s
    System For Each spr_R
    spr_R is overlapping Enemy
    
    ... spr_R pick parent spr_tower
    ... For Each Enemy
    
    ...............
    

    Also you should probably use Bullet behavior for bullets, unless you want them to work like guided missiles.

  • As I know Bullet behavior doesn't work without turret?

    I tried to use turret but it's impossible for them to shot 5 targets in the same time

    Also you should probably use Bullet behavior for bullets, unless you want them to work like guided missiles.

    Try changing your code like this

    THANKS A LOT! THATS HELPED! I'll test it more and came back if something went wrong

  • As I know Bullet behavior doesn't work without turret?

    Of course it works by itself.

    The difference between Bullet and MoveTo is that Moveto will stop at enemy position, but Bullet will continue flying.

    .

    Turret can shoot at multiple enemies, but it needs time to turn to each of them.

  • > As I know Bullet behavior doesn't work without turret?

    Of course it works by itself.

    How can I shoot Bullet without using turret?

    The difference between Bullet and MoveTo is that Moveto will stop at enemy position, but Bullet will continue flying.

    I need to go Bullet directly to Enemy and chase them

    Turret can shoot at multiple enemies, but it needs time to turn to each of them.

    Yeah, I need to do it at the same time, that's why I decline it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just create/spawn a sprite with Bullet behavior and it will automatically fly at its current angle. It's a very basic behavior and very commonly used. Definitely doesn't require a turret.

    You can make the bullet chase enemies by setting its angle towards the target on every tick.

    You can use MoveTo behavior too for guided bullets, but you'll also have to move to enemy position on every tick.

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