Consensual dynamics with local externalities