Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | bill_rizer900 |
I am trying to make a game where you climb a ladder up and down.
so far I am using an area 2d and attaching a script to call a function on the player to press a button to ascend the ladder, but the player doesn’t ascend the ladder
Here is the function code:
func climb():
motion.y = 0
print ('climb')
if Input.is_action_pressed('ui_up'):
motion.y -= speed
elif Input.is_action_pressed('ui_down'):
motion.y += speed
pass
Any suggestions?