The game im working on allows custom player names. Is there a way to use something like "Hello There $PLAYER1" in message text to auto-insert players names?
If the RMVX has the same code as RMXP.
Posted wrong code, go lower for the correct one.
Doesnt seem to work, what am I missing?
http://www.neasot.org/pub/ss1.jpg
Sorry about that.
Its suppose to be \n[X]. XD
Use \n[X], X = Actor ID in the database.
So, in the event you use that code for the name, and in the game it will show the name of the player.
Example:
\n[0] shows the name of the first member of the party.
\n[1] shows the name of the first actor in the database.
The syntax is correct now, but I get a windows error popup window anytime the event is invoked. :-\
The error is "Script 'Window_Message' line 218: NoMethodError occured. undefined method 'name' for nil:nilclass"
I tried with different combinations of numbers of players in party and all that. No luck.
Thoughts?
Are you using a custom message system script?
Nope, I'm pretty "default".
Don't know, maybe you should copy all the data from your project into a new project.
Actually, it's the default script's fault. It doesn't include an option to use the 0.
To fix it, go to line 218 in Window_Message and replace it with the following -
@text.gsub!(/\\N\[([0-9]+)\]/i) { if $1.to_i == 0
$game_party.members[$1.to_i].name
else
$game_actors[$1.to_i].name
end }