I am currently coding one AI Script, i was wondering if you have suggestions to how prioritize differents states ?
I use different Area2D to detect the differents states and a node Timer to periodically force the patrol function. However i want the DODGE STATE be priority over the CHASE STATE.
Let me know your thought
i call the choose_action() in the process together with the movements.
Example of detector node
func onDetectorbodyentered(body: Node) -> void:
state = states.CHASE
player = body