- Joined
- Sep 3, 2006
- Messages
- 940
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Breathe of fire?I'm trying to make a spell that damages units within a range of 500 in a 60 degree cone towards teh target of the spell.

FindTargets

Events


Unit - A unit Finishes casting an ability

Conditions


(Ability being cast) Equal to Breath of Fire

Actions


Set locOfCaster = (Position of (Triggering unit))


Set targetPoint = (Target point of ability being cast)


Set tempGroup = (Units within 500.00 of locOfCaster matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True))


Unit Group - Pick every unit in tempGroup and do (Actions)



Loop - Actions




Set tempLoc = (Position of (Picked unit))




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Angle from locOfCaster to tempLoc) Greater than or equal to ((Angle from locOfCaster to targetPoint) - 30.00)






(Angle from locOfCaster to tempLoc) Less than or equal to ((Angle from locOfCaster to targetPoint) + 30.00)





Then - Actions






-------- The picked unit got hit, so do your effects here --------





Else - Actions






-------- Otherwise, it's NOT within the cone --------




Custom script: call RemoveLocation(udg_tempLoc)


Unit Group - Remove all units from tempGroup


Custom script: call RemoveLocation(udg_targetPoint)


Custom script: call RemoveLocation(udg_locOfCaster)
A-------B
\ P /
\ | /
\|/
O
just a note, 2 times 60 degrees makes 120 in total, so if you want 60 you have to use -30 and +30 degrees
you could also base it on channel and have dummy do BoF the level u want it to be.
