Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Calling the NameInput for a Variable-Stored Actor(SOLVED!), Should be simple...I hope
DUFUTA
post Feb 20 2012, 08:33 AM
Post #1


Level 5
Group Icon

Group: Member
Posts: 60
Type: Musician
RM Skill: Intermediate




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.

This post has been edited by DUFUTA: Feb 22 2012, 10:05 AM
Go to the top of the page
 
+Quote Post
   
Pera
post Feb 20 2012, 11:52 AM
Post #2


Level 2
Group Icon

Group: Member
Posts: 28
Type: Event Designer
RM Skill: Undisclosed




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


__________________________
Crede quod habes, et habes
-Believe that you have it, and you do.
Go to the top of the page
 
+Quote Post
   
DUFUTA
post Feb 21 2012, 06:31 AM
Post #3


Level 5
Group Icon

Group: Member
Posts: 60
Type: Musician
RM Skill: Intermediate




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.
Go to the top of the page
 
+Quote Post
   
heisenman
post Feb 22 2012, 09:12 AM
Post #4


Level 13
Group Icon

Group: Revolutionary
Posts: 237
Type: None
RM Skill: Undisclosed




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


__________________________
Complainers gonna complain
Go to the top of the page
 
+Quote Post
   
DUFUTA
post Feb 22 2012, 10:04 AM
Post #5


Level 5
Group Icon

Group: Member
Posts: 60
Type: Musician
RM Skill: Intermediate




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
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th June 2013 - 07:49 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker