[MV] Scripts in Show Text using Variables

ccarmine

Warper
Member
Joined
Oct 8, 2019
Messages
2
Reaction score
0
First Language
Italian
Primarily Uses
RMMV
Hi everyone, i'd like the event to say the name of the weapon i have equipped.

//in the event page
I save the script in a variable:
V002 = $gameActors.actor(1).equips()[0]
and then in the show text i put -> \v[2]

photo2.JPG

but when i'm in game it gives me the text [object Object] instead of (in this case) Dagger.

photo.JPG

Also, the character is dual wield, so i do similar things for the second weapon:
V003 = $gameActors.actor(1).equips()[1]
and in the show text -> \v[3], but it gives me the same thing.

I can't figure it out. Can someone please help me?
Thanks for reading.

PS. This is my first post, if i've done something wrong, let me know.
 

Attachments

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,379
Reaction score
1,559
First Language
English
Primarily Uses
RMMV
The problem is that the equips() function returns the actual Game_Item object that represents the weapon: you'd need to do $gameActors.actor(1).equips()[0].name
 

Hyouryuu-Na

Procrastinates 24/7
Veteran
Joined
Jun 15, 2017
Messages
642
Reaction score
1,373
First Language
Not English
Primarily Uses
RMMV
Use this: $gameActors.actor(1).equips()[0].name
Edit: ooh I was late by a few seconds
 
Last edited:

ccarmine

Warper
Member
Joined
Oct 8, 2019
Messages
2
Reaction score
0
First Language
Italian
Primarily Uses
RMMV
Thank you guys! :LZYcheeze:
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
493
Reaction score
216
First Language
English
Primarily Uses
RMMV
The problem is that the equips() function returns the actual Game_Item object that represents the weapon:
Just noting that it returns the database object, not the Game_Item object which is just a tiny wrapper with a type and an ID.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
493
Reaction score
216
First Language
English
Primarily Uses
RMMV
Yes, that's why I cut the solution out of my quote. :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

And back. Trying to work online with no internet for 1.5 days was...interesting. I felt like a character in a old Sierra game trying to find internet due to all the hoops I had to jump through just to get online for work.
grief... if MV didn't have certain plugins already, I think I'd upgrade to MZ. seeing like 10 MV plugins in 1 MZ one is hilariously convenient lol.
Have you already checkes out my mapping tutorial on the blog? I would love to hear your feedback and things you'd like to see in the future!

one of character for my upcoming game idk how to design o_O

Designing patches that can 'augmented' to clothing based armor. Such good fun. A bit time consuming due to the need to create image displays, but the patches are limited so it's not too tiring.
Note: lol, posting this made me find a couple mistakes.

Forum statistics

Threads
100,737
Messages
978,945
Members
132,359
Latest member
PhilKeepItReal
Top