1. I am trying to catch the event when someone collects resources (Chopping wood, mining or picking up plants).

    As far as I can read from the docs,
    Code:
    void OnDispenserGatherGather(ResourceDispenser dispenser, BaseEntity entity, Item item)
    Would be my method of choice. However, this is not firing at all when I am chopping wood (didn't try the other two). Why is that?

    Thanks
     
  2. Wulf

    Wulf Community Admin

    I don't see anything that changed with it, but we'll take a look.
     
  3. There's a typo in your method name, it should be OnDispenserGather (not OnDispenserGatherGather). This method is called for collecting from Trees, Rocks, and dead animals (including human meat etc, but not looting them).

    For the Quarry and the Oil Pump, the method is OnQuarryGather(MiningQuarry quarry, Item item). The core difference is that the resources don't go directly to the player, but rather into a loot bin.

    Gathering from plants (or small rocks and wood) does not call either of these. I assume these trigger the item pick up event instead.
     
  4. Wulf

    Wulf Community Admin

    Good catch! It looks like I need to fix the example in the Docs, which is how the OP got it.
     
  5. Yep, that was the issue. Thanks