This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

So I am making a game were your the player running from an A.I killer (it's a kinamaticbody2d.) So first I want to make it so when you touch the kinamaticbody2d it reloads the scene. Then like every A.I I need it to move and I want it to follow the player so if someone knows how to do that I really need to know how to.

Godot version 3.3.2
in Engine by (93 points)
edited by

What you're asking is very basic programming, depending how deep you wanna dive in. Regarding your request, there are tons of tutorials out there, like the platformer one from BornCG or Rafa Fiedo which includes enemy ai.
You should start with that. Learning is not a race, it's a marathon, it takes time.... which brings to point number 2, always add details in your question. I don't know if you plan to do a sidescroller, top down or even 3D (NavigationMesh for pathfinding). Depending on that, the AI has to be programmed differently where top down or ¾ view is the easiest.(Navigation2D)

Also I want to make one that just moves around randomly then if it's on the player screen it starts moving towards the player. Could you send the source code for that in a comment or answer?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.