Combining two variables as a string in a third variable

JDevain

Veteran
Veteran
Joined
Oct 21, 2018
Messages
121
Reaction score
46
First Language
English
Primarily Uses
RMMV
Let's say I set the value of a couple of variables, like:

first_name = Jane
last_name = Doe

but I also want a third variable called full_name that is a string that says "Jane Doe", so something like:

full_name = first_name last_name

I found a way to do it in VX Ace, but I can't find anything for MV.

Thanks!

EDIT: By the way, I tried using:

$gameVariables.value(64) $gameVariables.value(65)

but I get an error message "Unexpected Identifier"
 
Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,122
Reaction score
10,613
First Language
Czech
Primarily Uses
RMMV
String($gameVariables.value(64)) + " " + String($gameVariables.value(65))
 

JDevain

Veteran
Veteran
Joined
Oct 21, 2018
Messages
121
Reaction score
46
First Language
English
Primarily Uses
RMMV
Beautiful. Thank you!
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,122
Reaction score
10,613
First Language
Czech
Primarily Uses
RMMV
Maybe you should learn javascript. It's not difficult, pinky promise!
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,105
First Language
English
Primarily Uses
RMMV
No need for the String constructor if they are already strings :)
Code:
$gameVariables.value(64) + " " + $gameVariables.value(65)
Or if you want to *puts on top hat and monocle* be fancy (MV 1.6+ only):
Code:
`${$gameVariables.value(64)} ${$gameVariables.value(65)}`
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Another plugin complete and ready for Wednesday!
Just for the record I have greatly enjoyed the past couple months of using RPG Maker MV - enough that I went ahead and bought MZ although it's going to be a bit before I seriously start a project with that.
I have a pretty reasonable alpha of one game that's got roughly 4 hours of content and some bits and pieces of others after only about 300 hours total time and about 2 1/2 months of owning RPG Maker.....
I completely forgot which forum had the personal blogs for members. :LZSlol: It was probably a forum for the Ace program. I was going to see about posting a blog post, but I'm too tired, and if its associated with Ace, then its a moot point. :LZSlol:

Forum statistics

Threads
102,971
Messages
996,381
Members
134,433
Latest member
just_herefortheplugins
Top