You can do this if you override the unit’s hear(message, speaker, data) method in the level editor, either by assigning the unit a new hear method in a Referee’s extraCode property, or by using programming.Programmable on the unit to add a player-invisible hear method. You can see an example of this in the Hoarding Gold level.
However, this only really works well on NPCs. The player can only code the plan method in hero-based levels for UI simplicity, so although you could have the hero respond automatically in some way to the messages, the player can’t yet code the callback.
Thanks nick! You actually answered the next question in your second paragraph as well.
I noticed that hero’s automatically call out their ability they’re using as they perform it. I was going to try and use that as a trigger for my hero to either evade or shield depending on the input in PvP matches. Back to the drawing board it seems!