- Joined
- Jan 2, 2015
- Messages
- 171
i am making semi auto unit. I want the unit to cast the spell when he is attacked on enemy unit. but the problem is..if there is ally near him..he will target it because i set the trigger to pick any unit within 300 around him..so any unit include ally and enemy will be picked. how do i prevent this? is it possible to pick enemy unit behind him so it looks like semi boss fight?
-
Ai
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
(Unit-type of (Attacked unit)) Equal to Archimonde
-
-
Actions
-
Set Demon = (Attacked unit)
-
Set Temp_Group = (Units within 300.00 of (Position of (Attacked unit)))
-
Set Chance = (Random integer number between 1 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Chance Less than or equal to 15
-
-
Then - Actions
-
Unit Group - Pick every unit in (Random 1 units from Temp_Group) and do (Actions)
-
Loop - Actions
-
Unit - Order Demon to Undead Crypt Lord - Impale (Position of (Picked unit))
-
-
-
-
Else - Actions
-
-
-