I am using the plugin TMCard and there's the plugin command startCardBattle name val1 val2,val3,val4.
Then i checked the section of the plugin for the game interpreter
I want val1 val2 val3 val4 to be random numbers.. so i tried using a script call with this:
I automatically get the error "Reference Error : Scene_CardBattle not defined". What is causing the error?
Edit:
Solution found for TMCard Random Card Battle
Then i checked the section of the plugin for the game interpreter
JavaScript:
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (command === 'startCardBattle') {
var arr = args.map(this.convertEscapeCharactersTM, this);
var enemyName = arr[0];
var enemyItemCardId = +arr[1];
var enemyCardIds = arr[2].split(',').map(Number);
$gameParty.setActiveDeck(-1);
SceneManager.push(Scene_CardBattle);
SceneManager.prepareNextScene(enemyName, enemyItemCardId, enemyCardIds);
}
JavaScript:
$gameParty.setActiveDeck(-1);
SceneManager.push(Scene_CardBattle);
SceneManager.prepareNextScene("Enemy", 20, [1,2,3]);
Edit:
Solution found for TMCard Random Card Battle