Creating more strange abilities

i see that youre missing braces for your first if statement. If youre using an if and multiple statements follow it, you have to use braces to specify what should be conditional, or else itll just be the next statement. The one that i gave you doesnt need it because the only thing that follows the if is the forEach, which is one statement by itself even though itll do multiple things. But notice how in the forEach i had to use braces because it contains multiple statements in it.
the only thing thatll happen in your state specifically on a dodge is that the attacker loses an hp. the rest happens unconditionally.

But even without the braces, the gainHp and the showDamagePopup on the target should still run. ill assume that by it not working you mean that you still arent getting a damage popup for the actor? does anything else show up like extra misses or is it nothing at all?

Code:
<Custom Deselect Effect>
if (target.result().missed || target.result().evaded)
{
    user.gainHp(-1);
    user.startDamagePopup();
    target.gainHp(1);
    target.startDamagePopup();
    if (user.hp<=0)
        user.performCollapse();
}
</Custom Deselect Effect>
I have placed the braces, but now not only is the recovered HP not shown (the actor does recover), now, when an enemy attacks him, the word "Miss" appears three times, hahaha.
ok, that was a result i remember experiencing myself when setting up my states initially, which is why i had mentioned it. I couldnt remember what had caused it, so i had only described it.

From what i had understood from it, youll have to clear your actionResult since the missed one is being prioritized over the healing one. try this:
Code:
<Custom Deselect Effect>
if (target.result().missed || target.result().evaded){
    user.gainHp(-1);
    user.startDamagePopup();
    if (user.hp<=0)
        user.performCollapse();
    target.result().clear();
    target.gainHp(1);
    target.startDamagePopup();
}
</Custom Deselect Effect>
ok, that was a result i remember experiencing myself when setting up my states initially, which is why i had mentioned it. I couldnt remember what had caused it, so i had only described it.

From what i had understood from it, youll have to clear your actionResult since the missed one is being prioritized over the healing one. try this:
Code:
<Custom Deselect Effect>
if (target.result().missed || target.result().evaded){
    user.gainHp(-1);
    user.startDamagePopup();
    if (user.hp<=0)
        user.performCollapse();
    target.result().clear();
    target.gainHp(1);
    target.startDamagePopup();
}
</Custom Deselect Effect>
Now yes, now it works perfectly.
Thanks a lot!
I must thank you and ATT_Turan for all your help.
At the moment I already have all the skills, but in the future I will create new passives and enemy skills, so I will probably need your help again.
Thank you very much again!
Now yes, now it works perfectly.
Thanks a lot!
No problem. Good luck with your project
At the moment I already have all the skills, but in the future I will create new passives and enemy skills, so I will probably need your help again.
Dont forget to look at a js guide and at the script call list for MV before making your effects in the future.
Even with no JS experience, if you look at the notetags tags you have available, the script calls you can make, and some examples like those in these forums or in the tips and tricks section of yanfly's website youll be able to piece together more than you think you would.
If you end up not knowing how to do something after giving it a good attempt, youll be more likely to know whatll have to get done and ask more precise questions when getting help.
Dont forget to look at a js guide and at the script call list for MV before making your effects in the future.
Do you know of any pages that I can use as a guide or learn a little?
Thank you!
Do you know of any pages that I can use as a guide or learn a little?
...why not Google the words he already gave you?

a js guide

and at the script call list for MV

Original thread: https://forums.rpgmakerweb.com/threads/creating-more-strange-abilities.163650/