I added script to game object “player” with:
function init(self)
msg.post(".", "acquire_input_focus")
end
function on_input(self, action_id, action)
if action.released == true then
print("released")
print(action_id)
if action_id == hash("tap") then
print("TAP")
end
end
end
and get in Console:
DEBUG:SCRIPT: released
DEBUG:SCRIPT: hash: [unnamed]
DEBUG:SCRIPT: released
DEBUG:SCRIPT: hash: [unnamed]
Why I get action_id “unnamed”?
Space and touch not working at all, on_input not called.