This is how I made my enemy shoot my player ship. The first thing you will want to do is get a "Check Line of Sight Right" and "Check Line of Sight Left." You need to do this because there is a right side of cannons and a left side. By doing the same thing but on two different sides, it means that the enemy ship will actually check both the right and the left side of the cannons to see if the player actor is there or not. This will allow the cannons to then fire if they need to. This is how you then get them to check if the player is in the cannon's line of sight to shoot the player.
First off, you want to plug in all your cannonball projectiles into "Make Arrow" so that when they fire the "arrow," it will count as a projectile. So, when the enemy shoots the player, it will hit them and take health away. Then, what you will want to do is plug this into "For Each Loop." Once this is done, it means that the cannons will be able to all fire at the same time when they see the player. Then, "Get World Location." This will let the enemies find where the player is in the world. You will also want to plug in a "Get Forward Vector," which will let the enemy know where they are in the world. Plug this into "Add Pin" and set that to 1000, and join that to another "Aid Pin." Then, plug "Get World Location," "Aid Pin," and "For Each Loop" into "Time Trace By Channel." This will get your pirate ship's line trace to work and find where the player is. Then, connect this to "Cast To BP Third Person Character" and "Out Hit Hit Actor." This will mean that the enemy ship will be able to shoot and hit the player. Finally, connect that to "Fire Cannon Left/Right." This made my enemy able to look at and fire their cannons at the player.