Read GUI tutorials or review some basic triggering area of effect spells. Anyway UnitDamageGroup function is not recommended so its better to use UnitDamageTarget.
Starts the ability> ability is equal to aoe spell> caster, player, location/point variables declared> set bj_wantDestroyGroup = true ( custom script ) then Pick Every Units in an area> set picked unit variable > boolean check if it is not dead, it is enemy> UnitDamageTarget ( caster, picked unit )> remove leaks, null.