Godot Version
4.3
Question
Patroling but in specific path (you can change the path when ever you want)
Searching if noticed something suspicious “dropped coin for example”
Follow the player if he noticed him
If the enemy spotted the player but the player manages to run off, then he’ll take sometime to search for the player and if he didn’t find him, he’ll return
“Sometimes” if the enemy detected the player, he’ll have small time to inform the rest of his team mate
You need to create a state machine with the following states:
- PatrolingPath
- FollowPlayer
- SearchPlayer
- ReturnToPatrol (Maybe not necessary)
- Alert teammates
Then you should implement the logic inside the individual states.
Then you should think about what condition has to be true for it to change state.
Do you know how to setup a statemachine?
1 Like
alright, I’ll try learn these things in a state machine, thanks
I didn’t notice the last sentence, I know a little bit from the tutorials, but still I need know how to implement these ideas into states (I mean what should I write)
This depends a lot on how exactly you envision the enemies behaviour.
For the patrollin state you might want to create a predefined path and have the enemy follow this path until he changes states
1 Like