id use the "end_game" hook, and skip waiting altogether. otherwise, there is the "enter_frame" hook, if you really need to check each frame for a particular thing