Hey new here. I am having a problem with 3D movement. I want a bool (triggered by an input) to change the character speed but also change it's speed to something else if the button is pressed and the speed value is equal to or above 0.1. Here is my code:
if Input.is_action_pressed("box_form"):
is_in_box_form = true
else:
is_in_box_form = false
if is_in_box_form:
speed = box_form_speed
elif is_in_box_form && speed >= 0.1:
speed += box_charge_speed
else:
speed = 7.0
(btw 7.0 is the normal speed value)
With this code the "box form" does work in the first if statement but "box charge speed" doesn't affect anything in the elif statement. Any help with this?