How to put skill name into a string.

Poppie360

chocobo wrangler
Veteran
Joined
Feb 28, 2018
Messages
180
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,125
Reaction score
10,639
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
180
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

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,238
Members
137,608
Latest member
Arm9
Top