Use Wheel Mouse

Godot Version

4.2

Question

I want that when I turn the mouse wheel up it changes the weapon and when I lower it again it returns to the previous one, I use godot 4.2

Example:

func input(_event):
if _event is inputmousemotion:
if _event.**** == MOUSE_WHEEL_DOWN:
print(“change_gun”)

if event is InputEventMouseButton:
	if event.button_index == MOUSE_BUTTON_WHEEL_UP:
		print("wheel up")
	elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN:
		print("wheel down")