you need FSA (Easiest way to understand it is to check what FSA is and how they work) - state machines.
in short: the easiest state machine is just a state with transition to itself. what does that mean?
state is a abstract thing that describes objects current state (like you for instance) - let's say object is human. you are human right?
and let's say that you have 1 state called sleeping.
so you are object human with state sleep.
that state does nothing byitself. therefore we get transitions - objects that move one active state to another when some condition is met. let's take our human object with state sleep. sleep does nothing byitself
but if we make transition that sleep happens every time after 1 sec passess you get simplest machine. a bit more difficult machine would be if that transition is empty (could and couldn't happen) - describes undetermination - randomness.
but let's take our simple example and move on. now you have a human object who has a state sleep that repeats every 1 sec. now if we add a new state to our human - working - it's just a state. it never happens. but if we add transition from state1 (sleeping) to state2 (working) with condition after 7 hours. our first condition is going to rotate for 7 hours, but once it reaches 7 hours it's gonna go to state2 and stay there. If we then add condition on state2 - 14 hours to go back to sleep - after 14hours of being in state2 it will traverse to state1 back to sleeping. it's shown in the images below.
so, what you need really is this - state 1 - running, state 2 - jump high, state 3 - slide / roll /something.
then you need transitions from running state to itself - so it runs indefinitely, and transitions - to state jumphigh if you see /collide/whatever with low object, or to state3 if you colllide/see/is in range /whatever a high object (like flying birds or something). and on both of the state2 and 3 you need to have a transition back to running where it's condition is "after i've avoided"... hard to explain in words, here's the picture down there. what is good about these machines is taht only... your imagination is the limit. you can make 121241241 state machine that will work perfectly. you can make it so big and complex that it's just "like human" if you cover everything you possibly think of.