Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Names

(RPG Maker XP)

Ok. So i've made a name input sort of thing and all is well when writing messages and stuff. However, when they go to menu, the name that I've given the characters shows up. How do i make it that the name that the user inputs becomes the name of the character?

thx in advance :)
 
\N[n]
Will be replaced by the name of actor number n.

Is for in messages...for the menu....if you entered the name correctly it should change the player name....or use the change name function and have it read what the player input.
 
Snicker, nope it's "\" (backslash)

Eskuppe, are you using the "Name Input Processing" event command?
I just tried it out, and it seems to work fine. I see the new name in the main menu & Equip & Stat menues.

If you're using another method, please post it so we can help you debug it.

Be Well
 
Brewmeister;315660 said:
Snicker, nope it's "\" (backslash)

Eskuppe, are you using the "Name Input Processing" event command?
I just tried it out, and it seems to work fine. I see the new name in the main menu & Equip & Stat menues.

If you're using another method, please post it so we can help you debug it.

Be Well

It is? o.0
 
If you set the name for actor[1], and need the same name
for actors 5 & 9, your event should look like:

Name Input Processing: Aluxes, 10 characters
Script: $game_actors[5].name = $game_actors[1].name
Script: $game_actors[9].name = $game_actors[1].name

Be Well
 
You have a space between "$game_actors" and " [1].name"
just call me "eagle eye!" :)

It's the script input window that gets you.
No, you didn't change anything. the input window adds return characters for you. (it's an undocumented feature! aka "bug")
Put your spaces around the = sign, then you'll see it.

Be Well
 
i don't have a space..it just automatically goes to the second line...the code sentence doesnt fit in the one line..
and if u go up a few posts u'll remember i told u that i even tried copying ur code straight into mine...so...=/
 

khmp

Sponsor

That is indeed the problem. The script window is splitting the code into two separate lines. In my opinion the easiest thing to do is create a module:

Code:
#==============================================================================
# ** ESK_Helper
#------------------------------------------------------------------------------
#  A module that could contain a hodgepodge of functionality for use in call 
#  script.
#==============================================================================
module ESK_Helper
  #----------------------------------------------------------------------------
  # * Take Name
  #     x : The actor index who will take on actor[y]'s name.
  #     y : The actor index who will give actor[x]'s new name.
  #----------------------------------------------------------------------------
  def self.take_name(x,y)
    $game_actors[x].name = $game_actors[y].name
  end
end

To install it simply create an open slot in the script editor above main and paste in the code. Feel free to add other methods that manipulate globals if the 'Call Script...' thing keeps segmenting lines. To use this in 'Call Script...' it would go:
Code:
ESK_Helper::take_name(9,1)

And that will fit in the call script editor window easily.

Good luck with it eskuppe! :thumb:
 

khmp

Sponsor

:*) I'm surprised you didn't just call me an idiot Brewmeister. My answer is a hell of a lot more complex than yours. That didn't even cross my mind when I was reading the problem. :D

Go with breaking up the two lines of code, but keeping the assignment operator on the first like Brewmeister said, eskuppe. My answer is way more than what you need. Sorry.
 
No worries. Your solution is 'neater' (as in 'clean'), and is much more efficient if you need to reuse it a lot.
And, it's a really good example of what a "Module" is.

In this case, I expect it only gets used once at the beginning of the game, so the event script command is enough.

I think I've just gotten used to the event script command editor, and took it for granted that he would type it in correctly.

No big deal.

Be Well
 
thx vry much for all ur help!! :thumb::thumb::thumb:
:D:D:D:D:D:D:D:D:D:D

it works!! :D

again thx heaps!! ur all geniuses!!:thumb:

btw sry for taking a while to reply..i was on a skool camp..so..thx!!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top