0 votes

I want to create a simple ai system for an enemy but i dont now how to do or

The enemy has to have

Idle state
Walk state
Follow player state
Run state if thé player IS far
Attack state
Hit state
Die state
Thé enemy should idle for dôme Time then walk a Litle then idle then if he
Détectes thé player in area j'ai chasse then when he gèt close to him je will attack him
With a Sword
Thanks for any answer

Godot version 3.4 beta
in Engine by (12 points)

1 Answer

0 votes

You need a state machine. Here's a nice tutorial for you:


by (1,877 points)
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 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 webmaster@godotengine.org with your username.