I am currently making a game that is a naval game. I have the AI moving around the layout and need it to fire when it has line of sight of the enemy. Currently my issue is that the AI fires only when the player is directly to the right of it. I have the turret behavior being used with rotation off. If I turn rotation on the ship rotates toawrds the player then shoots. I need the ship no to rotate but shoot in any direction. Please help.
Why do you have the turret set to rotation off if you want the turret to rotate?
Because otherwise the whole image rotates
Would giving the turret behaviour to an invisible sprite pinned to the ship solve your problem?
Another solution would be to get rid of the turret-behaviour altogether and just spawn the bullet and set it's angle..
Develop games in your browser. Powerful, performant & highly capable.
Ill Pm you the link as i cannot post it. If you can get it to work or have ideas that would be great. I have tried the invisible object and it wouldnt move. it would just shoot in the same direction.
https ://www.drop box. com/s/kathqdvk9fxcxpz/Naval%20Warfare.capx?dl=0
After removing a lot of unnescessary events/conditions/actions:
https://dl.dropboxusercontent.com/u/485 ... nfire.capx
brendanschaffric you will find your answer file call Direction shoot.capx
https://www.dropbox.com/sh/eioscti86bpr ... 7YPza?dl=0
Okay thank you. I added more ships for enemy's in the layout all being the same one and now they will not shoot. Anyway to fix it?