2 Attachment(s)
How to call function of Windowclass a from windowclass b
Hi,
I'm currently working on new character sheet for the Forbidden Lands extension.
The game uses a lot of different combat actions, not all of which are available to you depending on your equipment. It's also (not yet sure if unnecessarily) nuanced in differentiating between different attack forms, with stabbing someone being different from slashing someone and other stuff. And some weapons allow you to choose different attack modes. Anyway, it's quite difficult for beginner to keep up with your available combat options and their advantages/disadvantes depending on your loadout.
So I'm working on making a combat sheet for the character sheet in which you can configure your weapons, and the sheet then displays only the combat actions available to you:
Attachment 35630
The Sheet is divided into two frames with different windowclasses, windowclass "weapons" for the upper frame in which you configure your weapons and armor, and windowclass "actions" for the lower frame in which your available actions are displayed. The windowclasses are connected to different scripts, let's call them "weaponsScript" and "actionsScript". The scripts are only called by the windowclasses.
"actionsScript" has a function to read the content of the "weapons"-frame and generate content the "actions" frame from this data. The function is triggered onInit() of the "actions"-frame, and can be triggered manually by the radial menu of the "actions"-frame.
However, I'd like to trigger the function whenever values change in the "weapons"-frame.
Is it possible to call the function of the "actionsScript" by onValueChanged()-functions of the "weapons"-frame, in a way that calling node if the "actions"-frame?
Or do I have to write a new script that is independent of the windowclasses, which operates from the charsheet base node?