How to put skill name into a string.

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
178
Reaction score
54
First Language
English
Primarily Uses
RMMV
so what i have been trying to do is something along the lines of
$gameVariables.setValue(1, $gameActors.actor(1).skill(1))
what i am trying to do is set the variable to the name of the first skill that the actor has learned. i haven't been able to find anything regarding how to do it, does anyone knows how to do that?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,124
Reaction score
10,618
First Language
Czech
Primarily Uses
RMMV
Code:
let skillname = $dataSkills[$gameActors.actor(1)._skills[1]].name;
$gameVariables.setValue(1, skillname);
 

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
178
Reaction score
54
First Language
English
Primarily Uses
RMMV
Code:
let skillname = $dataSkills[$gameActors.actor(1)._skills[1]].name;
$gameVariables.setValue(1, skillname);
huh, thanks, this is exactly what i am looking for.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

If you download a resource, be it art or plugin, please thank the creator for their time. We are all guilty sometimes of just grabbing something without commenting. Now is the time to go through your credit list and visit the threads/site where you got the resource from and leave a heartfelt thank you!
October is officially here. I'm hoping to get a call from Spirit Halloween soon. It didn't happen today, but I've got to keep my head high.
So, what is this "Inktober" everyone's speaking about? Because apparently, I have no idea what happens on this site...
O_O One day left until I can pre-order the new NSP album! Yay!
Ah, today's the start of Inktober! I should do that.

Forum statistics

Threads
103,489
Messages
999,737
Members
135,034
Latest member
Holben
Top