Switching motor direction

how does one change the direction of a motor using buttons rather than a joystick axis?

get motor value, multiply it by -1, and set the value

Search the forums for “motor button” and you’ll find lots of suggestions. Here is a good one.