How to combine behaviours

Hey, I need some help. So I want to make my player move up when he collides with a ladder AND presses up, but I don’t know how to combine the two behaviours

or if you guys could tell me how to make a vertically moving platform that changes direction when it collides with an object, it would be much appreciated