Ive tried all kind of combinations :/
Thats why I began to wonder if the base skill is the black sheep here?
Am I right that BoF is just instant targetless skill, so if I change to silence im sorted?
Or would carrion swarm be my best choice?
If a player targets a unit with breath of fire, then "target unit of ability being cast" will point to such unit properly. However, if they click on a point, then "no unit" is returned, and position of "no unit" will probably return a non-existent location (null). IIRC, create unit action doesn't work if any of its first four parameters is invalid.
Use the point data instead - (Target point of ability being cast). Even if a player clicks on a unit, the game will still provide the correct location.
-
Set point = (Target point of ability being cast)
-
Unit - Create 1 Peasant for Player 21 (Coal) at point facing Default building facing degrees
-
Custom script: call RemoveLocation(udg_point)
Now, let's analyse your code, step by step.
1) Vapor_I isn't being used anywhere.
-
Set VariableSet Vapor_I = (Vapor_I + 1)
2) (Position of (Damage Target)) - Damage Target is invalid for that event, and a position of a null unit is a null point - this entire action probably doesn't work at all because of it. Use target point of ability being cast instead.
-
Unit - Create (Random integer number between 8 and 10) Unyielding Dead for Player 21 (Coal) at (Position of (Damage Target)) facing Default building facing degrees
3) Moving Vapor_R doesn't work with "A unit enters/leaves a region" events. Unfortunately, when the game starts, that type of event copies the original size and position of such regions and won't dynamically update their location anymore. So, Enter Vapor trigger doesn't work. The unit group action within vapor tick trigger will get the current position of Vapor_R though.
-
Region - Center Vapor_R on (Target point of ability being cast)
4) The special effect should be created normally at the center of Vapor_R. However, there's a problem regarding its destruction. The (Last created special effect) is only capable of storing only one special effect at a time (this applies to all triggers in your map which creates special effects).
On the other hand, destroying the effect stored in Vapor (the special effect variable) only affects effects created by Count trigger. Still, this doesn't solve the problem of multiple units casting this spell at once, because Vapor is still a variable that can hold only one special effect at a time, too.
We need to remake this trigger in order to handle multiple effects, spell target positions and when DoT triggers should start and stop working.
-
Special Effect - Create a special effect at (Center of Vapor_R) using war3mapImported\Toxic Air.mdx
-
Set VariableSet Vapor = (Last created special effect)
-
Wait 10.00 seconds
-
Special Effect - Destroy (Last created special effect)
5) The unit group enumeration in Vapor tick will affect any unit that doesn't belong to player 21. That is, buildings, magic immune, invulnerable, allies, etc...
The action applied to those units just reduces their life by 200 points, but if a unit is killed during this process, the game won't know who the killer is. If the caster is a hero, they won't earn any experience point. Use "Unit - Damage Target" function.
-
Vapor tick
-

Events
-


Time - Every 1.00 seconds of game time
-

Conditions
-

Actions
-


Unit Group - Pick every unit in (Units in Vapor <gen> matching ((Owner of (Matching unit)) Not equal to Player 21 (Coal))) and do (If ((Life of (Picked unit)) Greater than 0.00) then do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 200.00)) else do (Do nothing))
Overall, the solution would be to re-create your triggers entirely, taking into account leaks (mentioned by Uncle), multiple units casting the spell at once (if needed), and properly handling units/effects. Though, we need more information about how exactly your spell works.