MZ How to check if a specific skill hit?

Gooooooood morning (Canada time)!

I was hoping someone could help me out with this as I've scratched my head a bit too long on it that I have open sores on my scalp (jk, that's gross). I had asked about something else in another thread and I kind of morphed it to this, but since redacted that bit of text from there to start a new thread as it's a different subject.

ANYWAYS.

During battle I'd like to be able to check if a specific skill, that has a partial success rate, was successful in it's hit/application. This specific skill runs a common event wherein I'd like the if statement to be, which would be if this skill is successful then do this, and if not, do this.

What I have right now is the Escape skill as a command. It runs the Flee Attempt common event which checks first if the party can escape. If so, it'll check if the skill was successful. If failure, it pushes a message to the battle log. On a success, I have it run BattleManager.processPartyEscape() which seems to work! (tested without checking the success)

I know there's $gameTemp.lastActionData(0) to read the last action made, but I don't think that's specific enough? And there's also result.isHit(), which might work? I'm just not sure how to put it all together. Perhaps with &&?

Thanks!
I'd like to be able to check if a specific skill, that has a partial success rate, was successful in it's hit/application
then you can check the target's result() and see if the skill wasnt dodged or missed and do stuff based on that. however, why bother with that? you can just make the skill a 100% accurate certain hit and put the rng for its success/failure within the common event itself
then you can check the target's result() and see if the skill wasnt dodged or missed and do stuff based on that. however, why bother with that? you can just make the skill a 100% accurate certain hit and put the rng for its success/failure within the common event itself

Aw frick yeah maaaang. Beautiful. Love it. Here I am not knowing the basic extent of variables in a software I've used for so long-ish.

Thanks @Robro33 ! That does it wonderfully, lol.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-check-if-a-specific-skill-hit.176332/