Jump to content
Sign in to follow this  
minotaur

How can I get the game to display the current character's name?

Recommended Posts

Hi, first time posting here!

 

I'm making a game where the you start off with one character, and as the story progresses you receive more party members.

 

I need some text boxes to display the name of the character that is currently being used. For example, a text box that reads "[character] took the vase!". There doesn't seem to be a command in the text box system that calls for the current party member's name.

 

Is there an event command that lets you check which character is being used? I could imagine using multiple text boxes in that case, ie "\C[001] took the vase", "\C[002] took the vase" and so on.

 

Thanks!

Share this post


Link to post
Share on other sites

Based on what you're describing, try this.  Make a common event, and set it to parallel process, with a switch of your choice used to activate it.  In the command box of the common event, set up a variable (For the sake of the tutorial I will call it Variable 1) and set the value to 'party member 1's actor id' under game data.   Create an autorun event on the map where a new game is started, and in the command box have the switch mentioned above set to 'ON'.  Finally, when using \C, do it like this: \C[\V[1]].  This should achieve the effect you want, if I understand correctly what you're trying to do..

 

Edit: It's \N, not \C

Edited by devonm0
  • Like 1

Share this post


Link to post
Share on other sites

I understand what you have written here, and I followed all the steps and checked over everything several times.

 

I somehow can't get it to work correctly. When using \N[\V[1]] in a text box, it appears as a blank space. (example:"\N[\V[1]] took the vase"  = "  took the vase") This happens regardless of which character is member #1 of the party. If I use \V[V[1]] it displays as 0, regardless of which character it is, which suggests the Actor ID is not being collected properly. I am stumped!

Share this post


Link to post
Share on other sites

Sorry about the delay, I moved away from the site without closing the window so I could check back, but totally forgot anyway.

 

In any case, I'm assuming based on this issue you've encountered that you definitely used variable 1 to store the value?  Also, did you set up the autorun event?  I did forget to mention that you need to create a blank second  page with the switch you turn on as the condition or else the event will crash the game.  If you did everything, then can you please show me a snapshot of your common event?  Upload it through dropbox (you have to download the app or whatever it is, but it's free to use.)

Share this post


Link to post
Share on other sites

This is probably going to sound like a stupid question, but are you checking the text in-game?  You aren't using a preview, are you?  Sorry, it's just the only other thing I can think of.

Share this post


Link to post
Share on other sites

Yeah, I'm test running the game each time and checking in multiple maps + multiple characters. I screenshotted all relevant things:

 

 

The autorun event in the beginning of the game (Event Page 1):

http://i.imgur.com/cJs3rYC.png

 

(Event Page 2):

http://i.imgur.com/hk9Pfis.png

 

One of the text boxes used for testing this:

http://i.imgur.com/sxZovlL.png

 

How it appears in game:

http://i.imgur.com/IxQEHU5.png

 

How it appears while using a different character:

http://i.imgur.com/BUNB3Ee.png

Share this post


Link to post
Share on other sites

Do you have any other events that change variable #1? Do you have any events that turn "off" switch #3? Are you sure you have a character in the first party spot? Are you using any scripts that affect variables? Can the player name the character, or is the name set up in the database?

 

I tried your setup in a new project and it worked just fine - the character's name showed in the text as it should. So it's not the way you have set up your events.

Share this post


Link to post
Share on other sites

I tried your setup in a new project and it worked just fine - the character's name showed in the text as it should. So it's not the way you have set up your events.

 

I suspected this may have been the case. I've checked all my events and I can't find the confict anywhere. There are no other events that change Variable 1, no events that turn off Switch 3. Not using any scripts. The character names are set in the database. I'm really stumped, don't know what to do, looked over everything and can't find what's wrong here x.x

 

EDIT: I have fixed it!! On the first screen I added the condition of "Switch 3 is ON" to my cutscene event in the beginning of the game and now it works as intended. 

 

Really appreciate the help devonm0 and shadowblack, I will learn from this! Thank you very much :D

Edited by Xena

Share this post


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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted