A while back, I asked how I could make var values permanent, so I could use it over and over in script calls.
Since then I got a lot a lot done and learned quite a bit more about how to make plugins. One thing I can't seem to figure out...
How can I read info like the example above, but instead of reading it in a script call, I want to use them in formal's of a second plugin.
I also need to read out the params set by the user. So when I work in the second plugin, I can use the params as they were set in the first plugin.
Can anyone help me out with this, please?
In plugin:
In project script call:
JavaScript:
Object.defineProperties(window.JDN, {
picId: { get: function() { return $gameVariables.value(1); } },
arrX: { get: function() { return [0,48,48,48,96,96,96,144,144,144]; } },
arrY: { get: function() { return [0,48,96,144,48,96,144,48,96,144]; } },
});
In project script call:
JavaScript:
const { picId, arrX , arrY } = JDN;
$gameScreen.movePicture(picId, 1, arrX[picId], arrY[picId], 100, 100, 255, 0, frames);
Since then I got a lot a lot done and learned quite a bit more about how to make plugins. One thing I can't seem to figure out...
How can I read info like the example above, but instead of reading it in a script call, I want to use them in formal's of a second plugin.
I also need to read out the params set by the user. So when I work in the second plugin, I can use the params as they were set in the first plugin.
Can anyone help me out with this, please?