I want to have some sort of enemy in my game which wanders around the level and once he sees the player in his line of sight, chase the player until he lost the player and once he is close enough restart the level.
I think I know how to do the last part, I’ll add a box collider or something like that onto the enemy gameobject and once the player touches the collider I can restart the level, that isn’t really the problem.
I just do not know how to make a gameobject walk around the level (maybe let it walk to some position like waypoints and make a list of them) and check if he can see the player. I got very little to zero knowledge about coding, I can read and understand most codes, but I am not very good at it, I just started coding etc. Anyone can push me into the right direction or maybe have some code already I could use.
If anyone wants to help I appreciate it a lot and if you need more information, I will try to tell more.
Also I have tried to use the Rain AI, if anyone knows how to use that for this, it would be a lot more easier I guess. Anyway thanks for reading and hopefully you can help me!