- Joined
- Nov 19, 2020
- Messages
- 3
- Reaction score
- 0
- First Language
- Jacob
- Primarily Uses
- RMMV
I am attempting to pull the name of a characters equipped item from an array and outputting it to a menu via drawText:
if ($gameActors.actor(index + 1).equips()[6] == null) {
var rune = "No Rune";
} else {
var rune = $gameActors.actor(index + 1).equips()[6];
};
this.drawText(rune, x, bottom - lineHeight * 2, width);
When no item is equipped in that slot, it outputs "No Rune" as expected, but when an item is equipped to that slot, it doesn't output the name or even the ID of the item, it outputs "[object Object]"
if ($gameActors.actor(index + 1).equips()[6] == null) {
var rune = "No Rune";
} else {
var rune = $gameActors.actor(index + 1).equips()[6];
};
this.drawText(rune, x, bottom - lineHeight * 2, width);
When no item is equipped in that slot, it outputs "No Rune" as expected, but when an item is equipped to that slot, it doesn't output the name or even the ID of the item, it outputs "[object Object]"
Attachments
-
343.4 KB Views: 3

