How do I discipline my turrets!

0 favourites
  • 3 posts
From the Asset Store
10 turrets rendered in 3D with top down and menu views. Three upgrade levels per tower.
  • I'm making a sort of Nuclear Throne tribute and have enemies with guns which act as turrets and turn towards the player's position when in line of sight then fire every few seconds (randomised with a timer). The problem I have is that the guns sometimes point the right way at the player (muzzle first) and sometimes the other way (stock first). I can't spot a pattern for when it happens and sometimes an enemy will switch between the two during the course of a game. However, the bullet always fires in the right direction.

    The guns are set to an image point on the enemy every tick (I've also tried pinning) and told to acquire the player as a target when the player is within their line of site and unacquire when not. The guns themselves have both the line of sight and the turret behaviours.

    Any help greatly appreciated!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • if the gun is facing left in your image editor, it's origin is in the right place (this is also the rotation center) and you are not using any mirroring, everything should be ok..

    If there are still issues, it would probably be wise to share an example capx, because if you can't see any pattern, it will soon become a guessing game otherwise..

  • Sorry! I've worked it out now - I had set the guns to be mirrored when the enemies were moving in a certain direction, then collapsed that set of sub-events and forgotten all about it. D'oh!

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