- Joined
- Feb 23, 2019
- Messages
- 38
- Reaction score
- 7
- First Language
- English
- Primarily Uses
- RMMV
I've been using variables and switches to have a weight functionality in my game. It's been working well up until I decided I wanted an evented way for the player to discard an item. Then I run into the problem of how to retrieve the item weight. After searching the internet for plugins and not finding anything that quite matched my needs, I decided to use an item's "price" as the item's weight. Since there will be no shops in the game, this should work except that I can't quite get the code to retrieve the price to work!
The event has the player select an item, which is assigned to variable 8 (Item ID).
The Control Variables function sets variable 28 (Item Price) equal to the script:
$dataItems[$gameVariables.value(8)].Price;
I've tried several variations of this code but nothing returns the correct price. What am I doing wrong?
The event has the player select an item, which is assigned to variable 8 (Item ID).
The Control Variables function sets variable 28 (Item Price) equal to the script:
$dataItems[$gameVariables.value(8)].Price;
I've tried several variations of this code but nothing returns the correct price. What am I doing wrong?