MadBeardMan
April 14th, 2017, 18:36
Folks,
How do I in script access the 'current' character/character sheet.
What I want to do, is move this code into a script file, when I do the 'getDatabaseNode()' accesses the wrong item (the skill window) and not the parent, the character sheet (ie ID_0001).
<script>
function onDrop(x, y, draginfo)
if draginfo.isType("shortcut") then
local sClass, sRecord = draginfo.getShortcutData();
if StringManager.contains({"ref_skills"}, sClass) then
CharManager.addInfoDB(getDatabaseNode(), sClass, sRecord);
return true;
end
end
end
</script>
Cheers
MBM
How do I in script access the 'current' character/character sheet.
What I want to do, is move this code into a script file, when I do the 'getDatabaseNode()' accesses the wrong item (the skill window) and not the parent, the character sheet (ie ID_0001).
<script>
function onDrop(x, y, draginfo)
if draginfo.isType("shortcut") then
local sClass, sRecord = draginfo.getShortcutData();
if StringManager.contains({"ref_skills"}, sClass) then
CharManager.addInfoDB(getDatabaseNode(), sClass, sRecord);
return true;
end
end
end
</script>
Cheers
MBM