Hello people, i am new on this forum i need help with something as the title says.
i need to check a skill hits the target, the skill plays a movie in a common event but it needs to check first if the skill hit the player or missed it. In the example picture i tried those codes one at a time but they are not working can someone help?
note: I don't want to use any plugin if there is a way, if not i am using visustellaz battle core plugin but its pretty complicated i couldn't find anything for my need about this.
First thank you for your reply, i tried what you said i hope i did it right but it gives error now like this;
...you didn't put the script call to play the video on the line after the if. I even wrote the instruction to do so in there for you.
Whatever is in your if statement needs to return true or false. Your last picture looks like it should return a number
To be fair, even googling mz scriptcalls can return just mv ones.
You can search the forum for a thread 'RPG Maker MV / MZ Script Call List' that will give you a link to all the scripts.
In there it says:
// In a Script command: play sample.webm (video filename without extension)
this.command261(['sample']);
No, there's different rows for MV and MZ. Look to the left. The script I posted is the MZ one.
Hmmm, isn't your conditional returning true if the attack missed? Didn't you want to play the video when it hit? Shouldn't you put the '!' mark before it? I'm not 100% sure. Below is the notetag with the exclamation mark...
<JS Post-Apply>
if (!target.result().missed)
this.command261(['DoubleAttack']);
</JS Post-Apply>
EDIT: Might need to check for evades too? Or use the "if hit" script?
Could you press F8 (or Fn then F8) after the attack and click on the Console tab to see if there is an error message?
I originally just jumped in this thread to give you the 'play movie' script from the script call list, so I'm no expert on this.
But I tested it and it tells me that that command261 is not a function. Then I just tried:
Video.play("movies/" + "DoubleAttack" + ".webm");
this.setWaitMode("video");
It did play the video, but then it says that this.setWaitMode is not a function. I don't have the skills to help you more.