Unable to get the frog object to jump in the Defold getting started tutorial (SOLVED)

I’ve completed the Defold tutorial upto Step5 and also the first 7 points of Step6. However, I when I hit
space the frog object does not jump. I keep seeing the below messages in the console.

WARNING:DLIB: Failed to send announce message (-22)

Also, if I place the frog object at some height above the ground it does not ‘fall’ but just runs its animation.

What could be wrong? I don’t think that I can copy the entire contents here as there is so much, can anyone share a working source for the tutorial?

Did you add the script as a script component to the hero game object? You can test if it runs by adding a print in the init() function:

function init(self)
print(“Hi, I am alive!”)

end

3 Likes

Hmm…yes, I get the exact same error and I can’t figure out why. Here’s what the console says:

INFO:ENGINE: Defold Engine 1.2.77 (86c9c6e)
INFO:ENGINE: Loading data from: build/default
INFO:ENGINE: Initialised sound device ‘default’

ERROR:GAMEOBJECT: Instance ‘/ground/controller’ could not be found when dispatching message ‘set_speed’ sent from main:/hero#script
INFO:DLIB: SSDP: Started on address 192.168.0.107
WARNING:DLIB: Failed to send announce message (-22)
WARNING:DLIB: Failed to send announce message (-22)

1 Like

I was having this very same problem recently and your solution solved it. Thank you sicher.

1 Like

Thanks a lot! I had missed the second part of this line in the tutorial

Finally, add a “hero.script” file and add it to the game object.

3 Likes

I did the same mistake, so I guess tutorial should be fixed a bit. :slight_smile:

what object of the game? There is tons of…

If you have followed this section of the tutorial, you should have a 'hero.go' game object file that you must add the script to.

Add the script as a Script component to the hero object (right-click the root of hero.go in the Outline and select Add Component from File, then select the hero.script file).

3 Likes