• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Shotgun Spell

Status
Not open for further replies.

cheesey

C

cheesey

i was wondering if someone could make or help me make a spell that would be like a shotgun, that is when it is cast it deals damage in a cone but damage decreases with distance increasing.
 
making the damage lower with distence it easy. But picking units in an EXACT cone requires advanced maths. You need to make a group of all units infront of the caster with the circle being its radius away infront of the caster and having a wide enough radius that the 2 edges of the cone touch the edge of the other side of the circle. Then using advanced trigonomitry it must filter all the picked units to only thoughs that fit in the cone. After that you just need to get the distence away from the caster the unit is and culculate the damage.
 
making the damage lower with distence it easy. But picking units in an EXACT cone requires advanced maths. You need to make a group of all units infront of the caster with the circle being its radius away infront of the caster and having a wide enough radius that the 2 edges of the cone touch the edge of the other side of the circle. Then using advanced trigonomitry it must filter all the picked units to only thoughs that fit in the cone. After that you just need to get the distence away from the caster the unit is and culculate the damage.

Uhhh... that would work, but I would go with a much simpler route. Base off of breath of frost. This has a buff. So, when you cast the ability, check for all units with the buff and then deal damage based on the distance from the caster. This method involves very little math and no complex cone/circle thing. Hope this helps...
 
Last edited:
Uhhh... that would work, but I would go with a much simpler route. Bases of off breath of fire. This has a buff. So, when you cast the ability, check for all units with the buff and then deal damage based on the distance from the caster. This method involves very little math and no complex cone/circle thing. Hope this helps...

Doesnt it only give the buff if the unit is effected by drunken haze though?
 
Status
Not open for further replies.

Similar threads

Back
Top