Need help with transfer/courier/carry role



  • Hello there, I'm a beginner and I dont know how to create a class to pick energy from a static harvester and put this energy into containers.. I think it should be similar to a normal harvester but I tried it and I dont know hwta I am doing wrong..

    Can you help me or give me some suggestions? Thanks in advance!



  • Look at the withdraw and transfer sections in the API documentation.

    http://docs.screeps.com/api/#Creep.withdraw http://docs.screeps.com/api/#Creep.transfer

    I have a creep that will withdraw from a container and transfer it to different structures that need it. (hauler) I have another creep that sits on top of a container and harvests from the resources in the room. (miner)