Show and handle choices while in battle

romepizza

Veteran
Veteran
Joined
Nov 9, 2015
Messages
45
Reaction score
1
First Language
German
Hey people,


so what I'd like to do is to show a few choices while in battle and run code depending on the users choice.


I managed to show these choices, but I don't know how to handle the outcome. I am btw useing the <After Eval> function of Yanfly's skill core.


Till now, I found this piece of code:


<After Eval>


choices = [];


params = [];


$gameMessage.setChoices(choices, 0);


choices.push("yo1");


choices.push("yo2");


choices.push("yo3");


choices.push("yo4");


choices.push("yo5");


choices.push("yo6");


params.push();


</After Eval>


The choices yo1-yo6 show up just as intended but I don't exactly know what and where the outcome of the choice is stored.


If I knew it, I would continue makeing if-sequences to run different code like "if(choice === 1)\n {mycode};". I also don't know what the params-Array is used for, maybe the answer is stored inside there?


Thanks in advance,


romepizza
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,546
Members
137,835
Latest member
yetisteven
Top