0 Favourites

How do I discipline my turrets!

  • 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!

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,139
karshinkoff's avatar
karshinkoff
Unread hot topic
56 4,734
MPPlantOfficial's avatar
MPPlantOfficial
Unread hot topic
0 Favourites
Why is Stencyl doing better?
44 16,855
Potato's avatar
Potato