- 91
- Posts
- 14
- Years
- Seen Sep 5, 2015
Someone asked this on 4chan somewhere on the internet and I got the answer.
This guy wanted to store the player's name into a variable and I was like "how do you even store words on variables?" and got curious myself.
You need to make a script call like this:
What you just did is replace a variable's value with "Text!!!!". Instead of "words" you can use a scripted value, but then you don't use "". For example
Will store the player's name as variable 99. It works like \PN, except you can't use \PN in the script call (it would store "PN").
You can store other stuff, such as the players trainer class (PKMN Trainer by default I believe) or any other stuff, such as a Mon's nickname? Maybe? OH YES I can teach you that and more. In my example I'll give my player a Chikorita, then I'll name it to whatever and store the mon's nickname. Ready? So you added your mon to the party. Great.
First line we find the Pokemon we are going to "edit". We don't edit, but we need a "target" to get values from. You can use other values such as pbFirstAblePokemon or $Trainer.lastPokemon instead of $Trainer.party[partyslotnumber, in our case its the first mon so its 0, 5 being 6th]
The second line will set the text to be our targetted mon's Nickname. Pretty simple.
The third line, as before, merely stores the text into the variable.
Of course to use this new variable as text use \v[x] in a text box.
I can't code for me mom's life but I figured this out thanks to Google. Hopefully it will help future nubs like yours truly or simply give you a new idea.
This guy wanted to store the player's name into a variable and I was like "how do you even store words on variables?" and got curious myself.
You need to make a script call like this:
Code:
t = "Text!!!!"
$game_variables[x] = t
Code:
t = $Trainer.name
$game_variables[99] = t
You can store other stuff, such as the players trainer class (PKMN Trainer by default I believe) or any other stuff, such as a Mon's nickname? Maybe? OH YES I can teach you that and more. In my example I'll give my player a Chikorita, then I'll name it to whatever and store the mon's nickname. Ready? So you added your mon to the party. Great.
Code:
poke=$Trainer.party[0]
t = poke.name
$game_variables[x] = t
The second line will set the text to be our targetted mon's Nickname. Pretty simple.
The third line, as before, merely stores the text into the variable.
Of course to use this new variable as text use \v[x] in a text box.
I can't code for me mom's life but I figured this out thanks to Google. Hopefully it will help future nubs like yours truly or simply give you a new idea.