Is there a method to hear another unit's say(message)?

Hopefully the title explains it. What I’m wondering is if I can have my hero react to what an npc or character says via their message box?

I’m hoping this is a feature as I’ve been trying my hand at automating any level that requires flags/realtime placement.

Thanks everyone!
(Side note: if I subscribe for a month, beat the subscriber levels and unlock the other heroes, do I get to keep them if my subscription expires?)

1 Like

No, sorry. That would be cool, but all you hear is gibberish. It is how the game is coded.

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.

1 Like

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!

1 Like