I need help on an ability where, the longer the missile goes the more damage it will do, after shooting it at a point.
So for instance the base damage is 50, and its range is 10. Then when you fire the missile, if it collides into an enemy 5 range from the launch point it will do 100% damage, but then at 10 range it will do 200% damage, and in between. 2.5 range = 50% damage for instance.
Does anybody know how this is done, preferably with the data editor, but if their is no other option then with triggers.
Take a look at the Search:Area field in the damage effect of your weapon. Add values to the area depending on how many times you want the damage to be changed. The Radius field deals with range. The Fraction field deals with amount of damage (in % i think too).
Rollback Post to RevisionRollBack
The Team - TnTProductions
TnTProductions latest Project - Docking Bay 13
TnTProductions Epic RPG in the making - Psionics: Chaos Rising
Check out our website on wixx! http://bulletbutter.wix.com/tntproductions
Take a look at the Search:Area field in the damage effect of your weapon. Add values to the area depending on how many times you want the damage to be changed. The Radius field deals with range. The Fraction field deals with amount of damage (in % i think too).
I'm not sure how it eventually works, as i have never done this kind of ability in data. But I think the fields wont allow you to 'dynamically' calculate the damage dealt for say, every 0.5 unit range. Pre-defined ones are possible tho: like anything beyond 5 range gets 2x damage, and anything below takes normal damage.
I would go with a trigger solution, that fires when a player uses an effect (a dummy effect when the missile hits). Then you take 'distance between points', and calculate how much damage it is supposed to deal.
@ShadowedShade: As for launching projectiles and colliding missiles, check the tutorial section there are some really nice ones.
Detect the dmg effect of your ability through a trigger and calculate the distant between the 2 units to find the bonus dmg.
To apply the bonus dmg create a dmg effect that does 0 dmg and do the action: create effect on unit from unit with bonus dmg (x) where bonus dmg is your calculated dmg.
Or have the missile spawn with a behavior that every 0.5 seconds(or whatever) it adds a second behavior(stackable) onto the missile that increases damage by either a flat rate or a percentage?
I have a unit with weapon like this! I used the trigger solution and it works perfectly. Haven't thought about using behaviors tho..it could work but I remember trying to put behaviors on missile units before. And I remember that behaviors do not work on missile units...maybe I did something wrong then...
One more idea for a solution: Validators used by Switch effects. There's a validator to calculate the distance between caster and target, and the Switch effect changes which damage effect is used based on validators.
I need help on an ability where, the longer the missile goes the more damage it will do, after shooting it at a point.
So for instance the base damage is 50, and its range is 10. Then when you fire the missile, if it collides into an enemy 5 range from the launch point it will do 100% damage, but then at 10 range it will do 200% damage, and in between. 2.5 range = 50% damage for instance.
Does anybody know how this is done, preferably with the data editor, but if their is no other option then with triggers.
Take a look at the Search:Area field in the damage effect of your weapon. Add values to the area depending on how many times you want the damage to be changed. The Radius field deals with range. The Fraction field deals with amount of damage (in % i think too).
I'm not sure how it eventually works, as i have never done this kind of ability in data. But I think the fields wont allow you to 'dynamically' calculate the damage dealt for say, every 0.5 unit range. Pre-defined ones are possible tho: like anything beyond 5 range gets 2x damage, and anything below takes normal damage.
I would go with a trigger solution, that fires when a player uses an effect (a dummy effect when the missile hits). Then you take 'distance between points', and calculate how much damage it is supposed to deal.
@ShadowedShade: As for launching projectiles and colliding missiles, check the tutorial section there are some really nice ones.
@ShadowedShade: Go
Detect the dmg effect of your ability through a trigger and calculate the distant between the 2 units to find the bonus dmg.
To apply the bonus dmg create a dmg effect that does 0 dmg and do the action: create effect on unit from unit with bonus dmg (x) where bonus dmg is your calculated dmg.
@SouLCarveRR: Go
Or have the missile spawn with a behavior that every 0.5 seconds(or whatever) it adds a second behavior(stackable) onto the missile that increases damage by either a flat rate or a percentage?
@BorgDragon: Go
that could have some unforeseen and less ... controllable consequences but it would work.
Yeah just give the missile a stacking buff that when it is removed by missile death does some splash damage/damage to the target unit of the missile.
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
I have a unit with weapon like this! I used the trigger solution and it works perfectly. Haven't thought about using behaviors tho..it could work but I remember trying to put behaviors on missile units before. And I remember that behaviors do not work on missile units...maybe I did something wrong then...
@sandround: Go
Could you please post up a demo map with that unit?
@ShadowedShade: Go
sure! Uploaded a map named "Damage Test based on distance" to battle.net. Its unlocked and public.
On bnet.... Why not just upload here to this forum thread?
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
One more idea for a solution: Validators used by Switch effects. There's a validator to calculate the distance between caster and target, and the Switch effect changes which damage effect is used based on validators.
@ShadowedShade: Go
if you still cant figure this out you can send me a pm. Ill make you a demo map of it. Otherwise good luck.
@sandround: Go
Oh, that works perfectly.
Thanks a lot for all the help guys.