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,627
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 Profile Posts

Anyone else find it amusing that people watch videos of tragedy and then try to take the "moral high ground" by having sympathy for the victims? Dude, you watched the tragedy for the same reason everyone else. People being injured is an instinctive human curiosity.
Say, does anyone know any other indie game development forums? Progress on my uni survey has been a little slow, so I wanna look into posting it around a bit more.

Forum statistics

Threads
104,304
Messages
1,005,416
Members
135,829
Latest member
LordPenguin666
Top