• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Shotgun Spell

Status
Not open for further replies.
Level 1
Joined
Aug 7, 2006
Messages
2
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.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
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.
 
Level 8
Joined
Sep 13, 2006
Messages
431
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:
Level 3
Joined
Aug 30, 2006
Messages
23
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.
Top