Confira o Videos Épicos #45!
9 Respostas   307 Visualizações
0 Membros e 1 Visitante estão vendo este tópico.
$game_map.screen.pictures[numero_da_imagem].show("Nome da Imagem", origem, x, y, zoom_x, zoom_y, opacidade, sinteticidade)
Window_Base.prototype.drawPicture = function('Score art', 0, 0) { var bitmap = ImageManager.loadPicture('Score art'); var pw = bitmap.width; var ph = bitmap.height; var sx = 0; var sy = 0; this.contents.blt(bitmap, sx, sy, pw, ph, x, y);};
O primeiro código não funcionaria pois são objetos completamente diferentes as imagens que tu mostra durante o gameplay e as imagens que tu desenha em janelas. Ainda que tu fosse mostrar uma imagem no gameplay, através de scripts o código para mostrá-la é muito diferente deste que mostra as imagens por evento. Este é mais restrito aos eventos mesmo.Agora, tu já fez bem em testar o segundo, é isso mesmo, mas somente criou a função com esse código. Chegou a tentar chamar ela dentro da janela que tu criou?
Scene_Nome.prototype.createWindow = function() { this._nomeWindow = new Window_Nome(); this.addWindow(this._nomeWindow);};
Scene_Nome.prototype.create = function() { Scene_Base.prototype.create.call(this); this.createWindowLayer(); this.createWindow();};
Window_Base.prototype.drawPicture = function(imageName, x,y) { var bitmap = ImageManager.loadPicture(imageName); var pw = bitmap.width; var ph = bitmap.height; var sx = 0; var sy = 0; this.contents.blt(bitmap, sx, sy, pw, ph, x, y);};
Window_Base.prototype.drawPicture = function(imageName, x,y) { var bitmap = ImageManager.loadPicture(imageName); var pw = bitmap.width; var ph = bitmap.height; var sx = 0; var sy = 0; this.contents.blt(bitmap, sx, sy, pw, ph, x, y);};Window_Nome.prototype.refresh = function() {this.drawText("Boss Defeated: " + $gameVariables.value(22) + " / 5", 0, 130, this.contentsWidth(), 'left');this.drawText("Treasures Found: " + $gameVariables.value(23) + " / 10", 0, 160, this.contentsWidth(), 'left');this.drawText("Secret Zones: " + $gameVariables.value(24) + " / 2", 0, 190, this.contentsWidth(), 'left');this.drawText("Heroes Found: " + $gameVariables.value(26) + " / 5", 0, 220, this.contentsWidth(), 'left');this.drawText("Game Time: " + $gameSystem.playtimeText() + " / 1:00:00", 0, 250, this.contentsWidth(), 'left');this.drawText("Rank: " + $gameVariables.value(30) + " / 100", 0, 280, this.contentsWidth(), 'left');this.drawPicture('Score art', 0, 0);};
var _Scene_Boot_create = Scene_Boot.prototype.create;Scene_Boot.prototype.create = function() { _Scene_Boot_create.call(this);};
Scene_Boot.prototype.loadMyImages = function() { ImageManager.loadPicture('Imagem');};
var afunc = function() { // a imagem estará carregada quando isso for chamado.};bitmap.addLoadListener(afunc.bind(this));