Simply set the sprite it switches to to have a special function activate at EOP (Motion tab, At End of Path, choose "Activate EOP_<SpriteName>*" which will then cause any functions named EOP_ followed by the name of the sprite, followed by anything you want to be activated at the end of the path.