When ants are attacked or their path is blocked, they start leaving a smell on the ground. It helps the other ants behind them to understand something is wrong. It makes them alert and they make a different path to continue what they are doing.