Hi,
To expand on my question listed in the title:
1. I want to have a scenario whereby a random item is lost (via theft) from the party inventory. However, as I cannot be sure what items the player will have, I cannot use the "change item" in the Event Commands.
2. I have managed to locate this thread whereby they suggested using a Script to reach the effect (of removing a random item from existing inventory).
var items = $gameParty.allItems();
var count = items.length;
if (count) $gameParty.loseItem(items[Math.randomInt(count)], 1);
I.e. "If the party has any Items, Weapons, and/or Armors in their inventory, pick one randomly and remove it."
However, I believe in this manner, I will not be able to write in the text box something along the lines of "We lost item X" because this Script does not check and record what item is lost.
3. Therefore, I am seeking help on the forums here to know if there is a way to:
=> Remove a random item from the party's existing inventory, &
=> Able to know which item was removed in the previous step
Thank you in advance!
To expand on my question listed in the title:
1. I want to have a scenario whereby a random item is lost (via theft) from the party inventory. However, as I cannot be sure what items the player will have, I cannot use the "change item" in the Event Commands.
2. I have managed to locate this thread whereby they suggested using a Script to reach the effect (of removing a random item from existing inventory).
var items = $gameParty.allItems();
var count = items.length;
if (count) $gameParty.loseItem(items[Math.randomInt(count)], 1);
I.e. "If the party has any Items, Weapons, and/or Armors in their inventory, pick one randomly and remove it."
However, I believe in this manner, I will not be able to write in the text box something along the lines of "We lost item X" because this Script does not check and record what item is lost.
3. Therefore, I am seeking help on the forums here to know if there is a way to:
=> Remove a random item from the party's existing inventory, &
=> Able to know which item was removed in the previous step
Thank you in advance!