Check if an item had been picked up

you could have the apple spawn another just prior to its destruction or you could bind a event to the apple being destroyed as shown below. as for the location part you could just use a random offset to the previous location or use something like get random point in reachable radius.