Help - Search - Members - Calendar
Full Version: Calling the NameInput for a Variable-Stored Actor(SOLVED!)
RPG RPG Revolution Forums > Scripting > Script Development and Support
DUFUTA
I've been studying the Interpreter script and looking for a way to call the Name_Input Scene to change the name of an actor whose ID has been stored in $game_variable[4]. After studying, I tried a few different ways, like:

CODE
$scene = Scene_Name.new($game_variables[4], 8)


The thought process there was to pass into the scene, the actor's id (game_variable[4]) and the max length for the name(8).

I know these are the only two parameters which should be needed for the scene.

Anyway, it seems too simple to be racking my brain wallbash.gif this hard over. So a quick bit of help would be appreciated.
Pera
QUOTE (DUFUTA @ Feb 20 2012, 08:33 AM) *
I've been studying the Interpreter script and looking for a way to call the Name_Input Scene to change the name of an actor whose ID has been stored in $game_variable[4]. After studying, I tried a few different ways, like:

CODE
$scene = Scene_Name.new($game_variables[4], 8)


The thought process there was to pass into the scene, the actor's id (game_variable[4]) and the max length for the name(8).

I know these are the only two parameters which should be needed for the scene.

Anyway, it seems too simple to be racking my brain wallbash.gif this hard over. So a quick bit of help would be appreciated.

I don't understand quite what you want to do mellow.gif . There is no need to store actor's ID since the first actor has the ID of 1, second 2 and so on.
On the other hand if you wanted to increase a variable by name input process that is done pretty easily and I think that you can figure that out on your own. If you don't know how to do it, I will be happy to help you.
Cheers! happy.gif
DUFUTA
I would disagree. One thing I've learned making games with VX is that you can Never say never. It may not be conventional thinking to change a 'random' actors name, but in this instance. That's what I need.

Here's the way it works, so maybe you'll understand it better:

At the beginning of my current project, you are allowed to create a character, from Name, Gender, Class and Sprite. Then you are permitted to choose skills and spells.

The scenario starts by adding to a variable:

$game_variable[4], (named "Currently Creating Actor") += 1

Then text, "What shall we call you?"

Then input name: (Here's where I need the script call, basing the name on the actor whose ID is equal to Currently Creating Actor Variable.)

It may not seem meaningful until the end of the scenario, when a character has been fully created. Then you are asked:

"Would you like to create another character?"

At which point you can decline and start the game, or say yes, where the process begins anew.
The variable adds another 1 to it's value and suddenly when you're naming a different actor this time around.

Understand? If not, I'll try harder to explain.
heisenman
I think this could have been done with conditional branches no?
w/e

Script call
CODE
id = $game_variables[4]
$game_temp.name_actor_id = id
$game_temp.name_max_char = 8

$scene = Scene_Name.new
DUFUTA
Thanks, Heisenman. Works perfectly.

I think it could have been done with conditionals, but if there's a high limit on the amount of actors you can create, then you're looking at a huge branch, when this, mere 4 lines of code does the trick.

I've grown to understand that even though there's often a 'way' to do things with events, it's not always the most efficient.

Thanks for the help. By the way, I like and use the fogs you created. biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.