Hello, I have been trying to create a plugin which will show messages and choices with relativly fixed text in them. The first message and choice works fine, but after the choice no more messages will be displayed even though the code gets run!
Here is the code for the first message and choice which work:
And here the function which should be called:
I would greatly appreciate help!
Here is the code for the first message and choice which work:
$gameMessage.setBackground(1);
$gameMessage.setPositionType(1);
$gameMessage.add(actorName + " will learn um and it costs " + cost + " " +$dataItems[crystalId].name);
$gameMessage.newPage();
if($gameParty.numItems($dataItems[crystalId])>=cost){
$gameMessage.setChoices(['Yes', 'No'], 0, 1);
$gameMessage.setChoiceBackground(1);
$gameMessage.setChoicePositionType(1);
$gameMessage.setChoiceCallback(n => {
$gameTemp.JLordSkillTreeLearnMessage(n, crystalId, actorId, interpreter, eventId, cost, skills);
});
And here the function which should be called:
Game_Temp.prototype.JLordSkillTreeLearnMessage = function(choicenr, crystalId, actorId, interpreter, eventId, cost, skills) {
console.log(choicenr);
$gameMessage.newPage();
var actorName = $gameActors.actor(actorId).name();
$gameMap._interpreter.wait(120);
$gameMessage.setBackground(1);
$gameMessage.setPositionType(1);
$gameMessage.add(actorName + " will learn um and it costs " + cost + " " +$dataItems[crystalId].name);
$gameMessage.newPage();
$gameMessage.setBackground(1);
$gameMessage.setPositionType(1);
$gameMessage.add(actorName + " learned skill");
$gameMessage.newPage();
};
I would greatly appreciate help!