Whatever good deeds and bad deeds we do automatically create good and bad karmas (rather fruits of karmas). But the actual play of that fruit of karma takes place at a time unknown to us.
When you ask ‘What triggers bad karma’, I believe you are asking when exactly the fruit of a bad karma comes into effect.
It is not easy to give answer to this, as the course of karma is beyond our grasping. But my guru Mata Amritanandamayi Devi has given a hint about it. She says, at such times when our egotism peaks, bad karma’s effect will start manifesting. So we should always be careful about the dirty plays of our ahankar.