I have a bunch of buttons inside a modal and I have another toggle widget in my project. I want depending on the value of that toggle to close the parent modal whenever I press a button inside it. I can easily do that with a script:
if(get("closemodal") === 1) {
set("parent", 0);
}
Is there any way to "inherit" a script so that I don't have to repeat it on every single child widget? Or is repeating it the only way possible?