Domaine concerné: Script Logiciel utilisé: rpg maker mv Bonjour a tous ! Voila mon idée, mon héros, ou héroine est un ou une détective et donc il a besoin d'une sorte de carnet de bord pour l'aider à répertorier diverses informations. J'ai donc pensé à ajouter une nouvelle catégorie ou ligne dans le menu de base que nous propose le logiciel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| Scene_Menu.prototype.createCommandWindow = function() {
this._commandWindow = new Window_MenuCommand(0, 0);
this._commandWindow.setHandler('item', this.commandItem.bind(this));
this._commandWindow.setHandler('skill', this.commandPersonal.bind(this));
this._commandWindow.setHandler('equip', this.commandPersonal.bind(this));
this._commandWindow.setHandler('status', this.commandPersonal.bind(this));
this._commandWindow.setHandler('formation', this.commandFormation.bind(this));
this._commandWindow.setHandler('options', this.commandOptions.bind(this));
this._commandWindow.setHandler('save', this.commandSave.bind(this));
[b]this._commandWindow.setHandler('carnet de bord', this.commandCarnetdeBord.bind(this));[/b]
this._commandWindow.setHandler('gameEnd', this.commandGameEnd.bind(this));
this._commandWindow.setHandler('cancel', this.popScene.bind(this));
this.addWindow(this._commandWindow);
};
[b]Scene_Menu.prototype.commandCarnetdeBord = function() {
SceneManager.push(Scene_CarnetdeBord);
[/b]
} |
la c'est ce que j'ai rajouté dans le script de base pour créer ma ligne , et la page de code suivante cest la ou j'ai du mal, je voudrais faire en sorte que quand on va dans le menu, quand on clique sur " carnet de bord " ca nous amène à une map créer pour
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| function Scene_CarnetdeBord() {
this.initialize.apply(this, arguments);
}
Scene_CarnetdeBord.prototype = Object.create(Scene_File.prototype);
Scene_CarnetdeBord.prototype.constructor = Scene_CarnetdeBord;
};
Scene_CarnetdeBord.prototype.initialize = function() {
Scene_Menu.prototype.initialize.call(this);
};
Scene_CarnetdeBord.prototype.select = function() {
this fadeOutAll();
SceneManager.goto(map = 'carnet de détective');
}
Scene_CarnetdeBord.prototype.cancel = function() {
return menu;
}
Scene_CarnetdeBord.prototype.stop = function() {
Scene_MenuBase.prototype.stop.call(this);
this._commandWindow.close();
};
Scene_CarnetdeBord.prototype.createBackground = function() {
Scene_MenuBase.prototype.createBackground.call(this);
this.setBackgroundOpacity(128);
}; |
Je pense que soit j'ai mis de mauvais codes, soit j'ai pas mis les bons, ou alors me suis totalement gourré lol
merci de maider
|