Hi,
I just downloaded Defold and have been reading a little bit.
For the moment I have an input with a mouse_trigger that sends actions “touch” when MOUSE_BUTTON_1 is pressed.
I have a wheel.container that contains 4 containers.
Each container contains a script but the on_input function gets called all the time (every time a press is done), which probably is how it was intended but I would like to do something on the clicked container (and not the rest of the containers). How would one implement so that the on_input is only listened to when there is a click on that certain game object?
function on_input(self, action_id, action) if action_id == hash( "touch" ) and action.released then print("Touch released!") end end
Best regards,
Tomas