The easiest method would be via an Event Dispatcher
, the entire thing could look like so:
Note this does not take repetitions into account, chances are the very same location / object will be chosen again. Not sure if that part is important, do tell.