- Joined
- Jun 2, 2009
- Messages
- 1,193
Let me tell you what happens in here.
When my AI controlled heroes attacked by enemy units, they are falling back for 1 second. Then checking if there are friendly units around.
Now currently i have a problem with this trigger. When creeps keeps spamming attack the AI controlled hero, they keep retreating. First i want to solve this issue. I believe i can make them ignore enemy units for x seconds and i can detect it with timer but still this trigger is just for one slot.
How can i make my system better? I know it looks so amateur. I have decided to create extra 10 triggers for 10 slots and i was started to think i am doing this with difficult way...This is why i am here.
When my AI controlled heroes attacked by enemy units, they are falling back for 1 second. Then checking if there are friendly units around.
Now currently i have a problem with this trigger. When creeps keeps spamming attack the AI controlled hero, they keep retreating. First i want to solve this issue. I believe i can make them ignore enemy units for x seconds and i can detect it with timer but still this trigger is just for one slot.
How can i make my system better? I know it looks so amateur. I have decided to create extra 10 triggers for 10 slots and i was started to think i am doing this with difficult way...This is why i am here.
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Attacked unit) Equal to zU_AIHero[12]
- ((Attacked unit) is in zUG_RegenReaper) Equal to False
- ((Attacking unit) is in zUG_CreepsDevil) Equal to True
- zBool_AIKaciyor_Creepten[(Player number of (Owner of (Attacked unit)))] Equal to False
- (Level of (Attacked unit)) Less than or equal to 21
-
Actions
- Set zBool_AIKaciyor_Creepten[(Player number of (Owner of (Attacked unit)))] = True
- Set TempPoint = ((Position of (Attacked unit)) offset by 375.00 towards ((Angle from (Position of (Attacking unit)) to (Center of PreviousTarget[(Player number of (Owner of (Attacked unit)))])) - 0.00) degrees)
- Unit - Order (Attacked unit) to Move To TempPoint
- Custom script: call RemoveLocation (udg_TempPoint)
- Game - Display to DebugGroup3 for 1.00 seconds the text: (PlayerNames[(Player number of (Owner of (Attacked unit)))] + Ühü vurdular kaçiyom)
- Wait (2.00 - ((Real((Level of (Attacked unit)))) x 0.10)) seconds
- Set zBool_AIKaciyor_Creepten[(Player number of (Owner of (Attacked unit)))] = False
- Game - Display to DebugGroup3 for 1.00 seconds the text: (PlayerNames[(Player number of (Owner of (Attacked unit)))] + Ehe kaçmam bitti)
- Set TempGroup = (Units within 500.00 of (Position of zU_AIHero[12]) matching (((Matching unit) is in zUG_CreepsReaper) Equal to True))
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in TempGroup) Greater than or equal to 1
-
Then - Actions
- Unit - Order zU_AIHero[(Player number of (Owner of (Attacked unit)))] to Attack-Move To (Center of NextTarget[(Player number of (Owner of (Attacked unit)))])
- Game - Display to DebugGroup3 for 1.00 seconds the text: (PlayerNames[(Player number of (Owner of (Attacked unit)))] + 1 taneden fazla creep var ben savasmaya devam)
-
Else - Actions
- Game - Display to DebugGroup3 for 1.00 seconds the text: (PlayerNames[(Player number of (Owner of (Attacked unit)))] + hmmm creep yok )
- Unit - Order zU_AIHero[(Player number of (Owner of (Attacked unit)))] to Attack-Move To (Center of PreviousTarget[(Player number of (Owner of (Attacked unit)))])
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TempGroup)