PDA

View Full Version : Execute Function in charsheet onLoad?



Sean89
July 18th, 2015, 15:07
Hey Community,

is there a way to update a list in the charsheet (like inventory, spells, ...) "onLoadComplete"? onInit is loading only one time, but i need a function updating everytime the user opens the charsheet.

In fact i need a action handler that looks like


function onLoad()
--stuff loaded everytime the user opens the charsheet
end

Hmmm, do you know what i mean? :D

damned
July 19th, 2015, 13:07
what are you trying to update? can you trigger the update on the field data changing values?

jreddin1
July 19th, 2015, 15:58
Add an onInit function to the first thing in your main window class's sheetdata. Everytime the window opens, that will get fired. From there, you can figure out what it is you want to do/call. In other words,




<windowclass name="MyCharacterWindow">
<banner_campaign>
<script>
function onInit()
MyPackage.onLoad();
end
</script>
...
</windowclass>