How do I discipline my turrets!

Just started using Construct 2? Post your questions here

Post » Thu Nov 19, 2015 4:55 pm

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!
B
5
S
2
Posts: 53
Reputation: 792

Post » Thu Nov 19, 2015 6:44 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
53
S
16
G
8
Posts: 6,157
Reputation: 19,744

Post » Thu Nov 19, 2015 8:34 pm

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!
B
5
S
2
Posts: 53
Reputation: 792


Return to Beginner's Questions

Who is online

Users browsing this forum: ramyaswetha and 0 guests