New feature: Wait_for_input functionality - a behavior function can wait for an input (for example an event)