Okay, I must be missing some step when trying to call this information, but I can't find it online.
This should, according to my understanding, populate 'K' with the array returned from $gameParty.weapons();
And then using '...' spread operator on the array, I'd generate a list of choices based on the array itself.
I've already done a partial test using ["a","b","c"]. And that works. The problem lies when I try to get the data of party weapons. So I'm clearly not using it right. I would very much appreciate some help on this one. Until then, I'm going to head to bed and tackle it again when I wake up.
Also of note, I had already tried declaring 'K' as an empty array before hand, though with JS that shouldn't be needed.
*Note - I'm using Visustella's Message Core, for Extended Choices, letting me go past the default # of 6. If that matters*.
Also, if possible, is there a way to also call the items names, based on the IDs provided from the data call? Logically speaking it should be a thing, but I can't find any references online on how to do so. Perhaps it's just me not using the right search words.
Again thank you in advance.
This should, according to my understanding, populate 'K' with the array returned from $gameParty.weapons();
And then using '...' spread operator on the array, I'd generate a list of choices based on the array itself.
I've already done a partial test using ["a","b","c"]. And that works. The problem lies when I try to get the data of party weapons. So I'm clearly not using it right. I would very much appreciate some help on this one. Until then, I'm going to head to bed and tackle it again when I wake up.
Also of note, I had already tried declaring 'K' as an empty array before hand, though with JS that shouldn't be needed.
*Note - I'm using Visustella's Message Core, for Extended Choices, letting me go past the default # of 6. If that matters*.
JavaScript:
let k = $gameParty.weapons();
$gameMessage.setChoices([...k], 0, 0);
$gameMessage.setChoiceBackground(1);
$gameMessage.setChoicePositionType(2);
$gameMessage.setChoiceCallback(n=>{
$gameVariables.setValue(1,n);
});
this.setWaitMode("message");
Also, if possible, is there a way to also call the items names, based on the IDs provided from the data call? Logically speaking it should be a thing, but I can't find any references online on how to do so. Perhaps it's just me not using the right search words.
Again thank you in advance.