When working on AI, just keep asking the questions: what do I want the computer to do, and when do I want it to do it? Those are your event actions and conditions. Keep adding layers of events to it and eventually you'll have something usable.
Using an instance variable to keep track of states can be a powerful tool to organize different behaviors in different situations.