Thanks for the reply.
I think this is pretty much what i have set up, but am using a boolean to change the state of the chest.
I am spawning characters which have the bullet behavior and then setting their angles to the chest they have picked. If no chest in sight then they do something else until a chest does come into sight.
I have something like this:
for each character that hasnt picked up a chest
chest/pick nearest to character (pick nearest one to character)
chest/chestFALSEchosen (has the picked chest already been chosen by a character)
character has LOS to chest
----- action ---- chest/set chosenTRUE (set boolean on chest to have been chosen)
chest has NOT been picked up by player
chest chosenTRUE (chest has been chosen by a character)
character has LOS to chest
----- action ---- character rotate angle towards chest (set the character towards that chest)
(sub events under the above)
stuff when the character gets within certain distances do certain things
when character is on top of chest set the picked up boolean to TRUE
add the chest count variable
destroy the chest
what seems to be happening with that is the spawned characters are still able to be given the same chest to aim at, if i collect it first they then aim at the next closest chest to them.
what i need is pick nearest that hasnt already been picked then move onto the next nearest if it has, but i dont think the picknearest is behaving like that.
Under the For Each Character at the top of this page, If the condition of "chest chosen" is TRUE in the same block (where it should be false to get the action to work) then I think it skips the action part associated, which is why i was thinking of storing and comparing the UID of the chests etc At the moment all characters seem to be picking the closest chest to them no matter what.