Simple enemy AI

Hello
(first I’m a noob in Unity coding, and English is not my native language so sorry for any mistakes)

Let’s begin.
Im working on a game for some time now, and i have a little problem with enemy AI. I have been searching for solution about a week now and probably my problem is simple but not for me

On attached picture you can see (red) enemy npc, (grey) Player. Movment is turn based and player movment is only 2 units forward, and rotation 90 degres on y axis, Something like fake grid system, but for my purpose is ok. And the problem ist that i can’t make my Enemy to move like player. I whant the enemy to target player then to move in his turn to a player in this sam way a him.

I real nead yo help , thanks

1110531--41865--$game_project_help.jpg

What is your problem?
Moving the 3D cube ? ( I would use ITween )

ps: what is your native language?

1110569--41866--$game_project_help.jpg

My native is Polish , im from poland.

I cant write a script that move cube in this same way as the player move, just need simple AI. Target player, then move to player , atack player, but the movment must be systematic . Player move, then Enemy,

There is an algo “A*” for moving on a 2D grid , look into that ( A* / A star )

Yes i know but this is not a true grid movment. I write the movment script by my self. And it simple like a stick.

I posted below my script.

if (Input.GetKeyDown(KeyCode.W))
{
transform.Translate(0,0,z1);
ruch_tura = false;

}
}

if (ruch_tura == false)
{
KoniecTury();
}

if (Input.GetKeyDown(KeyCode.D))
{
transform.Rotate(0,90,0);

}

if (Input.GetKeyDown(KeyCode.A))
{
transform.Rotate(0,-90,0);;
}