Collecting parts of an actor's name

Basically, I'm wanting to have a spot where something has the player's initials. For example, if I end up making the player's last name "Jones" by default, and they choose the first name "Andrew", then the object may end up saying either "A. Jones" or simply "AJ" based on which one I eventually choose.

Does anyone know how to store the first letter of an actor's name?
$gameVariables.setValue(1, $gameActors.actor(1)._name[0]);

Edit: Oops, it's not for MV, but VXAce... Sorry 😀
$gameVariables.setValue(1, $gameActors.actor(1)._name[0]);

Edit: Oops, it's not for MV, but VXAce... Sorry 😀
Thanks anyway.
For VX Ace it is very similar
Code:
$game_variables[variable_id_goes_here] = $game_actors[1].name[0]
For VX Ace it is very similar
Code:
$game_variables[variable_id_goes_here] = $game_actors[1].name[0]
Will that store the letter itself, or will that store the letter ID or something (Like 3 instead of C)?
Does anyone know how to store the first letter of an actor's name?
This was the original question, I was answering that question. For more information about how to get characters from strings you can check the documentation.

Like 3 instead of C
C in the ASCII table is 67, not 3. If you need the ASCII value for the character instead, you have to use the "ord" method on the single character string you obtain after storing it. You can find the said method in the documentation as well. If you want to obtain the index in the alphabet you have to create a table with the alphabet you want to use and get the index of the said character from that table (as not every language uses the same alphabet as other languages, even if they share characters).
This was the original question, I was answering that question. For more information about how to get characters from strings you can check the documentation.


C in the ASCII table is 67, not 3. If you need the ASCII value for the character instead, you have to use the "ord" method on the single character string you obtain after storing it. You can find the said method in the documentation as well. If you want to obtain the index in the alphabet you have to create a table with the alphabet you want to use and get the index of the said character from that table (as not every language uses the same alphabet as other languages, even if they share characters).
I was just wondering if that was an issue. If it's not, then that's a "yay for me!"🙂

Original thread: https://forums.rpgmakerweb.com/threads/collecting-parts-of-an-actors-name.111320/