Yea guys i know like i sayd ive tried everything and that includes the allowed targets option from the object editor. Im looking for the method with the triggers so please, if someone knows How is it possible using triggers, i would appreciate it. Thanks
I don't know the best solution, but maybe you have to use dummy spells.
For example:
you cast lightning shield on the enemy, with 0 dam, but with the animation.
Then you add immolation to the targeted unit, you hide all effects, and make it mana free(0 mana). U trigger it to turn on, then check the lightning shield buff (every sec for example), if it wears off, u turn off immo.
And u should hide it in a disabled spellbook.
Another example (maybe not the best compared to units' HPs):
make it damage 1.
If the damaged unit has buff (that show it is damaged by lightning), but i think it doesn't give any buff to the attacked unit.
In the damaged region, you pick all units, make a complex condition (not spell immun, not air, enemy, ...), and you heal back them, (set unit life = unit life + lightning damage) them every second (or in every damage period).
Second example of course can be used even without enemy damaging lightning shield, but in reverse mode. I mean, you check all enemy units in region, and you lower their hp.