You can use this resouce for any kind of selection. But you should know the character file names beforehand. Otherwise you nee to edit the resource.can this resource be used to call the player's outfit as well?
You can use this resouce for any kind of selection. But you should know the character file names beforehand. Otherwise you nee to edit the resource.can this resource be used to call the player's outfit as well?
Press F11 in RPG Maker XP to open script editor. Then, create a new script section above main (preferably, right above), then paste the script in the new empty section. You can also copy and past the script right in the Main section start, but I don't recommend this.Hello I start on pokémon essentials and I would like to know where to put the code I have and or please
What was your error when putting above main?i tried to figure out how to use your puglin but i dont understand nothing, i tried to use as plugin but the console dont identify the puglin, then i tried put it above main but the call function all says erro, its confusing for me
You can run extendtext.exe ()look at your project folder) to raise this limit, create a def above main (a bit more complex) or use your other example with some changesCode:overworld = ["trainer_POKEMONTRAINER_Red","trainer_POKEMONTRAINER_Leaf", "trainer_POKEMONTRAINER_Brendan","trainer_POKEMONTRAINER_May"] battle = ["POKEMONTRAINER_Red","POKEMONTRAINER_Leaf", "POKEMONTRAINER_Brendan","POKEMONTRAINER_May"] result = startCharacterSelection(overworld,battle) pbChangePlayer(result+1)
this is the example, its to many characters, the function to call the script dont allow me to put that many,
The 'startCharacterSelection' just return you the index choosed (i.e. 0 for Red, 1 for Leaf). If you want to use it to change your character, you need to store the result and call pbChangePlayer. This way:Code:startCharacterSelection( ["trainer_POKEMONTRAINER_Red","trainer_POKEMONTRAINER_Leaf", "trainer_POKEMONTRAINER_Brendan","trainer_POKEMONTRAINER_May"] , ["POKEMONTRAINER_Red","POKEMONTRAINER_Leaf", "POKEMONTRAINER_Brendan","POKEMONTRAINER_May"] )
r = startCharacterSelection(
["trainer_POKEMONTRAINER_Red",
"trainer_POKEMONTRAINER_Leaf"]
,
["POKEMONTRAINER_Red",
"POKEMONTRAINER_Leaf"]
)
pbChangePlayer(r+1)
Where did you called the event script? I used a random NPC in Lappet to test it. What was your essentials version?r = startCharacterSelection(
["trainer_POKEMONTRAINER_Red",
"trainer_POKEMONTRAINER_Leaf"]
,
["POKEMONTRAINER_Red",
"POKEMONTRAINER_Leaf"]
)
pbChangePlayer(r+1)
this worked but it change to a complete black screen with nothing
r = startCharacterSelection(
["trainer_POKEMONTRAINER_Red",
"trainer_POKEMONTRAINER_Leaf"]
,
["POKEMONTRAINER_Red",
"POKEMONTRAINER_Leaf"]
)
pbChangePlayer(r+1)
r = startCharacterSelection(
["trainer_POKEMONTRAINER_Red",
"trainer_POKEMONTRAINER_Leaf"],
["POKEMONTRAINER_Red",
"POKEMONTRAINER_Leaf"]
)
pbChangePlayer(r+1)
Add Essentials v21 compatibility and adjusts the examples
The line 'pbChangePlayer(result+1)' after 'somename' will crash the game, since game doesn't know what is 'result', so remove this line at this place. After this change, did you can at least change between first and second player? This should be working.I have a question: I put this above main:
First i have the code for character selection, that part works.
Below it I have this:
def somename
overworld = ["trainer_POKEMONTRAINER_Red","trainer_POKEMONTRAINER_Leaf",
"trainer_POKEMONTRAINER_Brendan","trainer_POKEMONTRAINER_May"]
battle = ["POKEMONTRAINER_Red","POKEMONTRAINER_Leaf",
"POKEMONTRAINER_Brendan","POKEMONTRAINER_May"]
result = startCharacterSelection(overworld,battle)
pbChangePlayer(result+1)
end
Then in the event I have this:
Script: somename
Script: pbChangePlayer(result+1)
I then get a crash after picking the trainer, removing the change player line results in the game continuing to run but with the default character regardless of choice. Any ideas? Also for the surfing and fishing animation, can i just add those to this list?
I did that and after picking any of the characters, it just gives me the default male character.The line 'pbChangePlayer(result+1)' after 'somename' will crash the game, since game doesn't know what is 'result', so remove this line at this place. After this change, did you can at least change between first and second player? This should be working.
I tested right now at a clear v21.1 in a NPC at Lappet Town and when I select (and confirm) Leaf (the female character), I changed into Leaf. This should be working, looks like something that you changed. I suggest testing in a vanilla v21.1.I did that and after picking any of the characters, it just gives me the default male character.