Astonaut Walking Tutorial Problem - Input not working (SOLVED)

#1

Hi, im following the walking astronaut tutorial and when i got to the part of moving the astronaut, i ran the game and the input didn’t work.

i don’t see any error in the console and saw no build errors

so i kept going. finished the tutorial and input still not working. did i skip something?

Walking astronaut tutorial.zip (3.3 MB)

0 Likes

#2

You need to put

msg.post(".", "acquire_input_focus")

in your script’s init function in order to receive input

0 Likes

#3

ah i see now thanks! i auto completed acquire_camera_focus instead of input!

0 Likes

#4

My advice if you’re just starting out with Defold is to not auto-complete ANYTHING. Write out every single character. This, IMO, is the best way to not only make sure you’re doing what you think you’re doing, but also, repetition leads to memorization (at least for most people, most of the time…). Extra time spent typing at the beginning is time saved looking through the API later, in my experience.

1 Like