A message that appears only if a skill works?

Hello all! I am trying to make a skill that will display dialogue ONLY if the skill works. I tried using a common event, but to no avail, since no matter what the skill does, hit or miss we still get the dialogue bubble. Does anyone have an idea on how to solve this?
have the message be triggered or conditioned on a switch, and use the damage formula to turn on that switch by javascript coding
The damage formula is only executed on hit
Thank you, it works very fine! The only new nuisance occurring being that darn "it had no affect" message right before the text bubble takes over.

Original thread: https://forums.rpgmakerweb.com/threads/a-message-that-appears-only-if-a-skill-works.78821/