@cloudor
Maybe built an internal table with unique "groundtarget eventid = ability's id" when the event gets first fired. Insert a boolean value into the table like
local myAddon.activeGroundTargetAbilities = {
[abilityid of ground target here] = boolean value,
}
Set it to true if the ability is not in the table yet and the events fires the 1st time.
Check if it's in the table by "if myAddon.activeGroundTargetAbilities[ability id] then" and remove it if the event fires the 2nd time.
You're able to react on the ground target ability ids this way at the 2nd time if the event callback function parameters are always the same
Be sure to clear the table at realoadui (maybe inside callback function of player activated event) and where needed in between.