Jump to content
Godu92

Displaying Variables as Text in Messages

Recommended Posts

Greetings forum dwellers,

So I recently got RPG Maker VX Ace in the Humble Bundle and have been trying my hand at making some test games which will hopefully lead somewhere. Even more recently I have begun to look into the complex abilities events, conditional branches, and scripts have to offer.

However, I am currently at a loss for how to create changing text within a message based on a variable.

What I mean by this is having a text box display: 

 

My goodness! A person has been injured! Is \v[x] alright?

 

Where x is he/she based on the condition of having picked a male/female character. I've looked around through various sites and have found some scripts that can read words out of the input menu. But nothing seems to be able to display a variable as text without it.

I've just tried dbchest's StringInput script which seems like it would be possible to use for this case, but I cannot seem to figure out how.

 

Any help/alternate options are appreciated,

 

Godu

 

TL;DR

Looking for a method to display a variable as text in a message

Share this post


Link to post
Share on other sites

You can display names in message boxes with \n[x] (x being the actor id)

 

You can also use a variable as x by doing

\n[\v[y]]   (y being the variable id which will use the number stored in the variable).

Share this post


Link to post
Share on other sites

You can display names in message boxes with \n[x] (x being the actor id)

 

You can also use a variable as x by doing

\n[\v[y]]   (y being the variable id which will use the number stored in the variable).

Yes, I have tried both of theses options in tandem with switches and branches, but they don't seem to be able to have say:

Variable 1 = "he"

And then have the text code of:

Is \v[1] alive?

To display:

Is he alive?

From what I've glimpsed, it is possible to store text in a variable; if you have a script for it.

Share this post


Link to post
Share on other sites

This can be easily done without additional scripts.

 

Just make a new blank actor, lets say actor 10, name him 'he', and if the player chooses to play as female, rename the actor 10 (not the hero) to 'she'. On the text message insert \n[10] and voila...

Share this post


Link to post
Share on other sites

XAxeEEG.png

This actually blew my mind, I never thought you could store strings into variables.

Share this post


Link to post
Share on other sites

Huh, I thought I had tried that before. I think its because I had the initialize variable on a different event and wasn't running before the other one.

 

But thank you Demintka, that is what I was looking for.

Now to figure out how to close this thread...

Share this post


Link to post
Share on other sites

You can report your thread to be closed or wait for a mod to notice like now.

 

Closed at OP's request

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted