How to trigger a function with two events connected?

Or even like this if you do not want to set up any bools, you can add many conditions this way: