Hi! I am learning defold and going through the tutorials. I have one strange issue with the rocket spawning, which looks like it is based on inputs, on this tutorial:
If I hold any combination of (up or down) and (left or right) a rocket is spawned, except if I hold up+left. In that case, the “fire” input is not detected, as indicated by the debug print message that does not get printed.
if action_id == hash("up") then
self.new_anim = hash("player-up")
self.idle_anim = hash("idle-up")
self.input.y = 1 -- [15]
elseif action_id == hash("down") then
self.new_anim = hash("player-down")
self.idle_anim = hash("idle-down")
self.input.y = -1
elseif action_id == hash("left") then
self.new_anim = hash("player-left")
self.idle_anim = hash("idle-left")
self.input.x = -1
elseif action_id == hash("right") then
self.new_anim = hash("player-right")
self.idle_anim = hash("idle-right")
self.input.x = 1
elseif action_id == hash("fire") and action.pressed then
print("fire")
self.firing = true
end
What could cause this? Could there be an exiting binding on up+left that “shadows” the one from the game?