MZ Any way to set current target and current user variable through common event?

I'm trying to do a dice type system

Set var 1 to attacker's stat
Set var 2 to a random roll of 20
Set var 3 to defender's defense stat

Add var 1 to var 2

If var 3 is less than var 2, calculate damage

I am using RPGMaker MZ and Visustella plugins, if that helps. Been trying at this all day, and no success getting the game to recognize the variables.
It would be more useful if you showed screenshots of what you're trying to do. Events by default don't know who attackers or defenders are, so how are you trying to reference that?

If you're doing this in battle, it sounds like you're trying to replace how attacking actually works in RPG Maker, and a common event isn't a good way to do that. I have a link in my signature to my plugins, and one of them is a custom hit formula plugin for MZ.

Original thread: https://forums.rpgmakerweb.com/threads/any-way-to-set-current-target-and-current-user-variable-through-common-event.164359/