Hello,
I’m using Defold Input to create a card game, with simple drag and drop, but I can’t have the listener to work, to prevent dragging some objects.
This :
cursor.listen(msg.url("#cursor"), cursor.DRAG_START, function(message_id, message)
if message.group == msg_card then
return true -- return true to block the event
end
end)
returns an error : “You must provide a valid cursor script url”.
I tried to set it up exactly like the drag and drop example, and call listen() in the init() function, but it doesn’t work.
I have a “game” object, with the cursor script (#cursor) attached, and a main controller script (#game).
All other events and messages work fine. Only the listener doesn’t.
Does anyone have an idea ?
Thanks a lot !