Script to identify whether attacker is actor or enemy?

Xypher: I have no idea why, but the code you posted (1) adds 2 TP to friendly units, not 1, and (2) kicks an error when enemies use the relevant skill. =/

Tsukihime: thanks for popping in! I should add that in any particular place, or just in a dangling script? And that's intended to work with which version of the "this skill should add some TP/MP" formula?
You used the phrase "kicking the 0 damage/no TP gain bug". That is not a bug; that is intentional.


All my script does is NOT automatically return 0 damage whenever an error in the formula occurs and instead cause the game to crash and tell you something went wrong.
Tsukihime: ah ha! That makes MUCH more sense. I couldn't figure out what on earth that code had to do with TP... 🙂


Thanks, that'll be useful.
So are we all done here now?
Hi Xypher, I'm working with Hierophantic on this project. Thanks to you and others for your help so far ^_^. I tried your most recent suggestion and it seems to be giving all enemies full tp when written into the damage formula. I'm wondering... What is the scope of a common event? What variables can it see? 

Original thread: https://forums.rpgmakerweb.com/threads/script-to-identify-whether-attacker-is-actor-or-enemy.30361/