2 Attachment(s)
CombatManager.setCustomDrop - event is executed twice
I am trying to create a custom on drop event on the Combat Tracker.
The idea is that i can drag special tokens into the combat tracker actor, and add stuff to it (damage, etca)
So I am having an issue, and then to be safe, I checked this and it happens with CORERPG code also
Here is what i did:
- Clean CORERPG code
After that, I edited manager_combat2.lua, and did this:
Quote:
function onInit()
CombatManager.setCustomSort(CombatManager.sortfunc Standard);
CombatManager.setCustomCombatReset(resetInit);
CombatManager.setCustomDrop(onDropEvent);
end
function onDropEvent(rSource, rTarget, draginfo)
local sDragType = draginfo.getType();
Debug.chat("onDropEvent");
Debug.chat("rSource",rSource);
Debug.chat("rTarget",rTarget);
Debug.chat("draginfo",draginfo);
end
So, testing, I added a PC, and dragged a dice on it
The function is being called twice (check attached image)
Attachment 38201
I have no idea why this is happening, any ideas?