In this program the hat and the cat are different sprites. When the cat touches the hat, the hat does a forever-go to cat. This way they will move together.