When creating the animation changes; it is to show the sprite may be different depending on the spawner... it's optional
% (modulo, remainder after division) https://www.scirra.com/manual/78/expressions
In his example , you have 4 clone of spawn1. their IID range from 0 to 4.
At the end of the loop, you increment by 1 your variable and you divide by 5 and you keep the remainder of your division (eg: 5%5=0 (5/5=1 remainder= 0))
Your variable is range from 0 to 4 as your IID of spawn1