for this particular quest, I added some new metadata to dropped items; in the game when you drop an item it creates the loot bag; the loot bag is also a unit, so it will have this onEnter function executed on it as well; so you will have to test separately for that; might be something like:
```
if(unit.id < 0 && unit.data && unit.data.droppedBy > 0) {
    // this should be a loot bag, it will have a "loot" array
    // next, even though it is an array, for a loot bag it'll only be one item, so just grab it
    var item = unit.loot[0];
    if(item.$template.name === 'Candy Corn') {
        // here we should snatch up the loot bag's candy before any player's can grab it
        // and then give the droppedBy player the reward.
        // the droppedBy value is the id of the unit (player)
        // all triggers have a guests array of other units that are within its radius, so we can loop through and check if this player is a guest
       var player = _.find(trigger.guests, function(guest) {
              return guest.id === unit.data.droppedBy;
       });
       if(player) {
              // give them the item
              player.GiveItem(dataHandler.items[118]); // pumpkin mask is 118
        }
    }
```