continuous animation and square detection triggers made global for events to set