The idea is that it is created at target point, and ANY units attacking THROUGH the 'screen', have a chance to miss applied to their attack..
I can easily implement this... IF all my units were using Launch Missile effects, by a persistent apply behaviour (to missiles only) that lasts 5 seconds and causes them to miss.
But my problem is that most units in my map use 'hit-scan' or 'instant' attack weapons a lá Marine - Gauss Rifle.
So, my question: Is it possible to validate whether an object, or area is 'between' an Attacking Unit and a Attacked Unit (purely through data editor)?
Edit: I could... use the old method of collision detection (periodically searching a small area, offset towards the attacked unit, looking for the 'smoke screen object'. If found, set validator to true) ?
Edit Edit: Would this method cause 'lag' or other such 'issues' if firing lots of times simultaneously from multiple units? I would need between 8 and 12 periods, searching a 1.5 area offsetting, each and every time a unit attacked...
Only work around I can think of is the fog ability also applies a global buff to units that then uses a periodic Search Area effect with a limited arc that targets the point of the source of the effect (the fog) to then apply a buff back to the source (shooting unit) with only a chance of succeding which then reduces the damage of the uit to 0 for a limited brief duration.
Downside is this method only works for single casting.
Or you apply a series of dual buffs using offsets to all units around the fog and then make it have a damage response that nulls damage but only if the attacking unit has the partner buff.
Not yet had a chance to look into what you've suggested. But right now it sounds complicated.
I have a feeling triggering something like this might be easier purely because the Unit Is Attacked event fires before the damage is applied.
So,
Unit is attacked
Pick all units == SmokeScreen in area between Attacking Unit Point and Attacked Unit Point
If picked unit = SmokeScreen
Apply 0.1s debuff to Attacking Unit causing no damage or % miss on attack.
One option is that you could use a search effect with a "modify unit" effect which has a chance to nullify missiles which it finds within the smoke screen area.
Problem is he has problems with instant ranged attacks that dont use missiles.
Only other option I can think of is to create an invisible unit at the site of the fog that if it is found by an arced search area done by a buff on the attacking unit has a chance to apply a short duration buff that all Damage effects are disabled by.
I'm creating a Smoke Screen ability.
The idea is that it is created at target point, and ANY units attacking THROUGH the 'screen', have a chance to miss applied to their attack..
I can easily implement this... IF all my units were using Launch Missile effects, by a persistent apply behaviour (to missiles only) that lasts 5 seconds and causes them to miss.
But my problem is that most units in my map use 'hit-scan' or 'instant' attack weapons a lá Marine - Gauss Rifle.
So, my question: Is it possible to validate whether an object, or area is 'between' an Attacking Unit and a Attacked Unit (purely through data editor)?
Edit: I could... use the old method of collision detection (periodically searching a small area, offset towards the attacked unit, looking for the 'smoke screen object'. If found, set validator to true) ?
Edit Edit: Would this method cause 'lag' or other such 'issues' if firing lots of times simultaneously from multiple units? I would need between 8 and 12 periods, searching a 1.5 area offsetting, each and every time a unit attacked...
Only work around I can think of is the fog ability also applies a global buff to units that then uses a periodic Search Area effect with a limited arc that targets the point of the source of the effect (the fog) to then apply a buff back to the source (shooting unit) with only a chance of succeding which then reduces the damage of the uit to 0 for a limited brief duration.
Downside is this method only works for single casting.
Or you apply a series of dual buffs using offsets to all units around the fog and then make it have a damage response that nulls damage but only if the attacking unit has the partner buff.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
Not yet had a chance to look into what you've suggested. But right now it sounds complicated.
I have a feeling triggering something like this might be easier purely because the Unit Is Attacked event fires before the damage is applied.
So,
Unit is attacked
Pick all units == SmokeScreen in area between Attacking Unit Point and Attacked Unit Point
If picked unit = SmokeScreen
Apply 0.1s debuff to Attacking Unit causing no damage or % miss on attack.
@Nardival: Go
One option is that you could use a search effect with a "modify unit" effect which has a chance to nullify missiles which it finds within the smoke screen area.
@Khalanil1: Go
Problem is he has problems with instant ranged attacks that dont use missiles.
Only other option I can think of is to create an invisible unit at the site of the fog that if it is found by an arced search area done by a buff on the attacking unit has a chance to apply a short duration buff that all Damage effects are disabled by.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg