Its through logic settings. Take a look here: https://www.thebuddyforum.com/pokefarmer-forum/287008-share-behaviors-community-5.html Last page and look for Necrids post, you might find his stuff helpful.