求助大神,MV里面用事件修改脚本要怎么写?
我在自己联系写MV的脚本,谢了一个基本上没人能看懂,不过能运行的脚本,
现在我想在游戏里面使用事件来更换脚本里面的一个图片,怎么写都不能达到效果,
在这里求助一下大神,帮我看看,要怎么改一下,下面是脚本RUBY 代码
/*:
* @default
* @param tihuantup
* @desc 在这里输入图片名称。
* @default
* */
////HUD代码
(function(){
var oldSceneMap_start = Scene_Map.prototype.start;
Scene_Map.prototype.start = function(){
oldSceneMap_start.call(this);
this.createCunstomHudWindow();
};
Scene_Map.prototype.createCunstomHudWindow = function(x, y, width, height)
{
var bcbc=0;
var parameters = PluginManager.parameters('HUD');
var tihuantup = String(parameters["xintiaoshang"]||"xintiaoshang");
//这上面是我自己加的更换图片,可是怎么做都能改
var xinshang = new Sprite(ImageManager.loadPicture(tihuantup));
//var xinshang = new Sprite(ImageManager.loadPicture("xintiaoshang"));
var xin3 = new Sprite(ImageManager.loadPicture("xue"));
var xinzang = new Sprite(ImageManager.loadPicture("xin"));
var tili2 = new Sprite(ImageManager.loadPicture("tilixia"));
var tili1 = new Sprite(ImageManager.loadPicture("tilishang"));
var siwang = new Sprite(ImageManager.loadPicture("siwang"));
this.addChild(tili2);
this.addChild(xinshang);
this.addChild(xinzang);
this.addChild(xin3);
this.addChild(tili1);
this.addChild(siwang);
xinshang.y = 522;
xinzang.opacity =0 ;
xin3.y = 620;
tili2.y = 520;
tili1.y = 520;
siwang.opacity = 0;
xin3.update = function()
{
var renwushux = $gameParty.leader();
Sprite.prototype.update.call(this);
var a = 523 + renwushux.hp ;
var b = 620 - renwushux.mp;
if(xin3.y < a)
{
xin3.y += 1;
}
elseif(xin3.y >a)
{
xin3.y -=1;
}
if(tili2.y < b)
{
tili2.y += 1;
}
elseif(tili2.y > b)
{
tili2.y -= 1;
}
}
xinzang.update = function()
{
Sprite.prototype.update.call(this);
ConfigManager.alwaysDash = true;
var renwu =$gameParty.leader();
if(renwu.hp = 250||xinzang.x >=0)
{
xinzang.x -= 0.5;
xinzang.opacity -= 10;
if(xinzang.x == 8)
{
var audio = {name:"0-xintiao",pitch:100,volume:100,pan:0};
AudioManager.playSe(audio);
var aaa = {color:(255,255,255,255),duration:10};
}
}
elseif(xinzang.opacity
页:
[1]