i think it is MV script right? because wherever i read people keep saying its for MV thats why the engine can't recognize it
Checking if the skill hits the target or misses
RPG Maker MZ Supporti think it is MV script right? because wherever i read people keep saying its for MV thats why the engine can't recognize it
That sounds to me like that function is normally called from a different object so you need to substitute "this" with an instance of that object. Or the function is from MV and won't work in MZ.
@enski123 No, this is from the RPG Maker MZ files:
@AquaEcho I have no idea about such things 😀 Like I said, I just posted here to give him the script from the script call list.
// Play Movie
Game_Interpreter.prototype.command261 = function(params) {
if ($gameMessage.isBusy()) {
return false;
}
const name = params[0];
if (name.length > 0) {
const ext = this.videoFileExt();
Video.play("movies/" + name + ext);
this.setWaitMode("video");
}
return true;
};
Game_Interpreter.prototype.videoFileExt = function() {
if (Utils.canPlayWebm()) {
return ".webm";
} else {
return ".mp4";
}
};@AquaEcho I have no idea about such things 😀 Like I said, I just posted here to give him the script from the script call list.
it says this.command261 is not a function
<JS Post-Apply>
if (!target.result().missed)
this.command261(['DoubleAttack']);
</JS Post-Apply>
i did copy paste this code for the skill's notetag
thank you atleast you try to help and spend time for me i really apreciate it
Oh, it's a Game Interpreter function, which means it's normally called from a map event or common event. I'm not sure how you call the Game Interpreter in battle, I'd have to look it up.
Cool.
Btw @enski123 I suggest you check how showing the video looks and works using just the:
before you spend anymore time on this. Because next you might just be asking how to make your own battle animations 😀
Btw @enski123 I suggest you check how showing the video looks and works using just the:
Video.play("movies/" + "DoubleAttack" + ".webm");before you spend anymore time on this. Because next you might just be asking how to make your own battle animations 😀
what you mean? my battle animations are the videos i play as movies 😀
You can try replacing "this" with $gameTroop since it uses the interpreter, I don't know if it'll work
thank you👍
its says the same error
"$gameTroop.command261 not a function"
Try $gameTroop._interpreter.command261()
now it says "Cannot read property '0' of undefined" at the console
Did you put your video file inside the brackets?
I tested what AquaEcho posted and it seemed to work for me.
I tested what AquaEcho posted and it seemed to work for me.
<JS Post-Apply>
if (!target.result().missed)
$gameTroop._interpreter.command261(['DoubleAttack']);
</JS Post-Apply>
oh the syntax () i used from aqua shouldn't be there now i copied your codes and it worked but there is another problem now 🙁 the game still continues in the background i mean the fight continues while the video is playing
Yeah, you need to ask someone how to put a wait time there, since it seems to be something else than a standard wait script? Only way I know of is to trick it to wait by putting a script there to make it play an empty animation and make it last as many frames as your video. Or you could check if the whole thing could be made with action sequences or something.
that will be almost like impossible for me even if we find to do that, because i have 80+ videos to play and each skill plays another video and i will keep adding new ones so it will be crazy hard 🙁 thank you anyway
Maybe
$gameTroop._interpreter.wait(200)
Original thread: https://forums.rpgmakerweb.com/threads/checking-if-the-skill-hits-the-target-or-misses.162964/