Add pin behavior to mineral.
Add instance variable to player. 1 for if he holds a mineral, 0 for if he doesn't. Start with default 0.
Make a function called "Find" that does this:
pick random mineral:
Find path to it.
Event: Upon path arrival AND player has no mineral.
PIN mineral to player plus set instance variable to 1.
Find path to house.
Other event : Upon path arrival AND player has a mineral (means has found path to house)
Destroy the mineral and set instance variable to 0
Call the "Find" function again.
On start of layout also call "Find" to make it start finding immediately.
My youtube channel contains some video's you can check out:
for the pickup and drop off logic :
youtu.be/4dD_Ajmjwic
for the path finding logic :
youtu.be/cf4fwgjAJK0
Hope you can fit the pieces together
cheers