Using a Variable in a nickname

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Long story made short, I'm nearly finished with my game, but I do have something that I'm a bit hung up on. At the end of the game, the player is given a score based on numerous factors (ex: gold, battle count, etc), but afterward, it's impossible to review your score. I do have an effective workaround if this isn't possible, but this method would be preferable; I'd rather set the player's nickname to their score.

Is there any way that a nickname can be set to a variable?
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
698
Reaction score
3,451
First Language
English
Primarily Uses
N/A
The script call
$gameActors.actor(id)._nickname holds the value. As a test, I changed Harold's nickname to 2222,
and in the status menu (the next time it was opened) his nickname was changed.

So ultimately, for actor 1 to have their nickname set to variable 20, it would be
$gameActors.actor(1)._nickname = $gameVariables.value(20)

EDIT This is, of course assuming you're using MV. This isn't in a maker specific thread (yet)
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
The script call
$gameActors.actor(id)._nickname holds the value. As a test, I changed Harold's nickname to 2222,
and in the status menu (the next time it was opened) his nickname was changed.

So ultimately, for actor 1 to have their nickname set to variable 20, it would be
$gameActors.actor(1)._nickname = $gameVariables.value(20)

EDIT This is, of course assuming you're using MV. This isn't in a maker specific thread (yet)

Sorry, it looks like I might have posted in the wrong forum. Unfortunately, I use RMVXA. Thanks anyway.
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
698
Reaction score
3,451
First Language
English
Primarily Uses
N/A
If it's VX Ace then try
$game_actors[1].nickname = $game_variables[20]

to replace the code from the MV example.
Of course replace the id in the brackets for both the Actor and the Game Variable to suit your needs.
Just tested it
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,496
Reaction score
5,332
First Language
english
Primarily Uses
RMMZ
Game Mechanics Design isn't meant for "how do I..." questions.

I've moved this thread to Ace Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
698
Reaction score
3,451
First Language
English
Primarily Uses
N/A
@Stupidbro did you try the ACE script call that I posted? It worked for me.
 

Stupidbro

Veteran
Veteran
Joined
Jul 8, 2019
Messages
87
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Yes. Sorry, I took a bit to respond. It works beautifully. Thank you!
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
698
Reaction score
3,451
First Language
English
Primarily Uses
N/A
Of course, glad I could help, sorry I assumed MV at first. I've gotta stop doing that ><
Let me know if there's anything else, I don't work much with ACE but I don't have a hard time finding script calls for it, I usually know where to look
 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top