this is a basic setup you can use, so see it as a mini tutorial (I ruled things out as it is not my my current use).
as it was used with messageCore but cant use it anymore, for changing row 1 first, reset 4 after.
so a little tutorial for anyone that want to use it (as this is 4 common event, but you can do with 2,
depends how you use it of course, but this is maybe the cleanest way I use too.
for chest Sound consistency as it plays once.
for Gold consistency common event
we always reset variable quantity to 1, so if you just call it without a amount, its gain 1.
for the Gold Event that is gained.
so we play the chest sound once here, switch, amount to get and the gold common event.
(SelfSwitch A can also be after "Get - Gold".
for Item, Weapon, Armor, it is slightly difference, but pay attention on the scriptcall.
Armor and weapon has a setting false (forgot what it did, but was target for equiping if memory reserved)
also here, default Quantity = 1 on reset.
the item event look like this.
common event target weapon ID 15, so it uses 1 variable for the id to get what you want (always use this.)
make sure you initialize variable 3 to be 1, or it might not work the first time as variable start with 0.
so initialize it to 1.
I hope this makes it more clear and how to use common event for more consistency on sound and gain items
🙂
Edit:
ii, iw, ia = messagecore code for the item Name.
JavaScript:
$gameParty.gainItem($dataItems[$gameVariables.value(2)],$gameVariables.value(3));
$gameParty.gainItem($dataWeapons[$gameVariables.value(2)],$gameVariables.value(3),false);
$gameParty.gainItem($dataArmors[$gameVariables.value(2)],$gameVariables.value(3),false);