Set automatically id for sprites