I'm trying to make an enemy which should loot random objects on map.
The enemy has a pathfinder behaviour.
I've added a boolean to the loot family which indicates the item looted or not.
The enemy should choose a random item and go towards it.
When it arrived, the boolean variable of the item should switched to false.
Then the enemy should choose another item which is not looted.
How can I do this?