|More player characters using a game variable|
|Click here for more tutorials!|
In this tutorial we will see how to have as many different players as you want by only updating a variable.
For this mod we need:
- A variable i.e: Variable 105
- The character sprites for walking and running
This a very simple mod, you only need to edit a few lines of code.
First search for this lines in the section Walk_Run, near line 48:
# Display running character sprite @character_name=meta else # Display normal character sprite @character_name=meta
Now we are going to replace them with this other lines:
# Display running character sprite chrval = $game_variables @character_name= chrval.to_s+"r" else # Display normal character sprite chrval = $game_variables @character_name= chrval.to_s+"n"
Now, change the intro script:
Search for this lines:
script: pbChangePlayer(0) script: pbChangePlayer(1)
And replace them with this:
script: pbChangePlayer(0) script: $game_variables = 0 script: pbChangePlayer(1) script: $game_variables = 1
In the next revision of this mod I will include also the modification for the trainer sprite and the sprites for diving and cycling.
For changing between trainers we need to update the variable's value i.e: trainer number: 1, variable value :1
When using this mod, you need the following files (replace X with the variable's value):
- Walking: Xn.png i.e: 1n.png
- Runnig: Xr.png i.e: 1r.png
Save this files in the same folder as standard characters.
To use this mod just create an event that changes the selected variable: