Godot Version
Godot Engine v4.4.stable.official
Question
` I have an enemy scene, which I will duplicate in the main scene to create multiple enemies.
I plan to makes these AI enemies circle the player-character and attack the player one at a time.
This is a 2D topdown game.
For this I wanted to keep state of these enemies global, so that every enemy can read every other enemy state and see if it can go for attack state, if not just wait a random time and try again.
What is the correct way to program this behaviour?
On the internet I couldn’t find how to make these multiple enemy-processes safely read-modify-write to that global state so that there is no race-condition.
Please help, thank you.
`