- Joined
- Feb 18, 2014
- Messages
- 3,623
How can I pick every units between two points and deal damage to them? Let's say I have Point A and Point B, I want any unit that crosses the red line between those two points to die instantly like in the example below :
I know some of you will say : why don't you just use regions? Well, that's because it's not like those two points will always be horizontal/vertical, this is just an example. What I am planning to do is to make a spell that creates a circle around the caster that kills all units that tries to enter/leave the circle. Like in the example below :
Now, I do know how to make circular damage using the trigger below. But I don't want it to be a circle because one of the dummies (Banshee) may get killed before they reach the caster which will then make that area safe. Let's say B dies, then the area between (B - A) and (B - C) will be safe to cross.
I know some of you will say : why don't you just use regions? Well, that's because it's not like those two points will always be horizontal/vertical, this is just an example. What I am planning to do is to make a spell that creates a circle around the caster that kills all units that tries to enter/leave the circle. Like in the example below :
Now, I do know how to make circular damage using the trigger below. But I don't want it to be a circle because one of the dummies (Banshee) may get killed before they reach the caster which will then make that area safe. Let's say B dies, then the area between (B - A) and (B - C) will be safe to cross.
-
Call of the Highborne Loop
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
Set COH_MoveRange = (COH_MoveRange - 5.00)
-
Set COH_DamageRange = (COH_DamageRange - 5.00)
-
Unit - Move COH_Dummy[1] instantly to ((Position of COH_Caster) offset by COH_MoveRange towards 315.00 degrees), facing COH_CasterLoc
-
Unit - Move COH_Dummy[2] instantly to ((Position of COH_Caster) offset by COH_MoveRange towards 270.00 degrees), facing COH_CasterLoc
-
Unit - Move COH_Dummy[3] instantly to ((Position of COH_Caster) offset by COH_MoveRange towards 225.00 degrees), facing COH_CasterLoc
-
Unit - Move COH_Dummy[4] instantly to ((Position of COH_Caster) offset by COH_MoveRange towards 180.00 degrees), facing COH_CasterLoc
-
Unit - Move COH_Dummy[5] instantly to ((Position of COH_Caster) offset by COH_MoveRange towards 135.00 degrees), facing COH_CasterLoc
-
Unit - Move COH_Dummy[6] instantly to ((Position of COH_Caster) offset by COH_MoveRange towards 90.00 degrees), facing COH_CasterLoc
-
Unit - Move COH_Dummy[7] instantly to ((Position of COH_Caster) offset by COH_MoveRange towards 45.00 degrees), facing COH_CasterLoc
-
Unit - Move COH_Dummy[8] instantly to ((Position of COH_Caster) offset by COH_MoveRange towards 0.00 degrees), facing COH_CasterLoc
-
Lightning - Move COH_Lightning[1] to source (Position of COH_Dummy[1]) and target (Position of COH_Dummy[2])
-
Lightning - Move COH_Lightning[2] to source (Position of COH_Dummy[2]) and target (Position of COH_Dummy[3])
-
Lightning - Move COH_Lightning[3] to source (Position of COH_Dummy[3]) and target (Position of COH_Dummy[4])
-
Lightning - Move COH_Lightning[4] to source (Position of COH_Dummy[4]) and target (Position of COH_Dummy[5])
-
Lightning - Move COH_Lightning[5] to source (Position of COH_Dummy[5]) and target (Position of COH_Dummy[6])
-
Lightning - Move COH_Lightning[6] to source (Position of COH_Dummy[6]) and target (Position of COH_Dummy[7])
-
Lightning - Move COH_Lightning[7] to source (Position of COH_Dummy[7]) and target (Position of COH_Dummy[8])
-
Lightning - Move COH_Lightning[8] to source (Position of COH_Dummy[8]) and target (Position of COH_Dummy[1])
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within COH_DamageRange of COH_CasterLoc matching ((Unit-type of (Matching unit)) Different than Banshee)) and do (Actions)
-
Loop - Actions
-
Set COH_PickedUnits = (Picked unit)
-
Set COH_PickedUnitsLoc = (Position of COH_PickedUnits)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between COH_CasterLoc and COH_PickedUnitsLoc) Greater than or Equal to COH_MoveRange
-
-
Then - Actions
-
Unit - Kill (Picked unit)
-
Custom script: call RemoveLocation (udg_COH_PickedUnitsLoc)
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
COH_MoveRange Equal to 100.00
-
-
Then - Actions
-
Custom script: call RemoveLocation (udg_COH_CasterLoc)
-
For each (Integer A) from 1 to 8, do (Unit - Remove COH_Dummy[(Integer A)] from the game)
-
For each (Integer A) from 1 to 8, do (Lightning - Destroy COH_Lightning[(Integer A)])
-
Unit - Make COH_Caster Vulnerable
-
Unit - Unpause COH_Caster
-
Animation - Reset COH_Caster's animation
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-