You can set the maze walls as solid and use Pathfinding. For example: On start of layout -> Tank find path to Player.X, Player.Y
Tank On path found -> Move along path
And then just add a line of sight to the tank, and when it has line of sight to the Player, rotate turret to Player.X, Player.Y by 10 pixels or so every 0.2 seconds.
I recommend you look into the Construct example game for this, found when making a new project.