Greetings,
I need to create following mechanics, where over time, at every 'Demonic Sundering' unit, a group of neutral-hostile units will spawn, and will go attack nearest non-neutral-hostile control point. After they destroy the CP, they will be again issues to attack nearest non-neutral-hostile control point.
The trigger when demons spawn:
I cannot change the 'Guard Distance' in settings to infinite, as I also have creep camps in map, and I need them to stay on point instead of chasing after the player for whole map. I had hopes the AI - Ignore guard position will help me out, but it was unsuccesful.
Any ideas how to fix the problem?
I need to create following mechanics, where over time, at every 'Demonic Sundering' unit, a group of neutral-hostile units will spawn, and will go attack nearest non-neutral-hostile control point. After they destroy the CP, they will be again issues to attack nearest non-neutral-hostile control point.
The trigger when demons spawn:
-
Demonic Sunderings spawning demons
- Events
- Conditions
-
Actions
- Game - Display to (All players) the text: |cffff0000WARNING:|...
- Sound - Play CoVQuestFailed <gen>
- Set TempGroup = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Demonic Sundering))
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
- Set TempLoc = (Position of (Picked unit))
- Set TempReal = 100000000.00
- Set Temp_Group = (Units in (Playable map area) matching ((((Unit-type of (Matching unit)) Equal to Control Point (15g)) or (((Unit-type of (Matching unit)) Equal to Control Point (20g)) or (((Unit-type of (Matching unit)) Equal to Control Point (25g)) or ((Unit-type of (Match
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Not equal to Neutral Hostile
-
Then - Actions
- Set TempPos = (Position of (Picked unit))
- Set TempReal2 = (Distance between TempLoc and TempPos)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TempReal2 Less than TempReal
-
Then - Actions
- Custom script: call RemoveLocation (udg_TempPos2)
- Set TempPos2 = (Position of (Picked unit))
- Set TempReal = TempReal2
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation (udg_TempPos)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Random integer number between 1 and 2) Equal to 1
-
Then - Actions
- Unit - Create 1 Vozhal Warrior [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Warrior [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Stalker [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Stalker [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Stalker [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Demoness [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Demoness [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
-
Else - Actions
- Unit - Create 1 Vozhal Warrior [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Warrior [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Warrior [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Voidwalker [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Voidwalker [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Sorcerer [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
- Unit - Create 1 Vozhal Sorcerer [lvl 1 ruptures] for Neutral Hostile at TempLoc facing Default building facing degrees
- AI - Ignore (Last created unit)'s guard position
- Unit - Set the custom value of (Last created unit) to 2
- Unit - Order (Last created unit) to Attack-Move To TempPos2
-
If - Conditions
- Custom script: call RemoveLocation (udg_TempLoc)
- -------- TempPos2 = Location of nearest CP --------
- Custom script: call RemoveLocation (udg_TempPos2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TempGroup)
-
CP dies by Demons
-
Events
- Unit - A unit Dies
-
Conditions
- (Custom value of (Killing unit)) Equal to 2
- (Owner of (Killing unit)) Equal to Neutral Hostile
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Control Point (15g)
- (Unit-type of (Triggering unit)) Equal to Control Point (20g)
- (Unit-type of (Triggering unit)) Equal to Control Point (25g)
- (Unit-type of (Triggering unit)) Equal to Control Point (35g)
-
And - All (Conditions) are true
-
Conditions
- ((Triggering unit) is A structure) Equal to True
- ((Triggering unit) is An Ancient) Equal to True
- ((Triggering unit) is A sapper) Equal to True
- ((Triggering unit) is A town-hall-type unit) Equal to True
-
Conditions
-
Conditions
-
Actions
- Set TempLoc = (Position of (Triggering unit))
- Set TempGroup = (Units within 1000.00 of TempLoc matching (((Owner of (Matching unit)) Equal to Neutral Hostile) and ((Custom value of (Matching unit)) Equal to 2)))
- Set TempReal = 100000000.00
- Set Temp_Group = (Units in (Playable map area) matching ((((Unit-type of (Matching unit)) Equal to Control Point (15g)) or (((Unit-type of (Matching unit)) Equal to Control Point (20g)) or (((Unit-type of (Matching unit)) Equal to Control Point (25g)) or ((Unit-type of (Match
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Not equal to Neutral Hostile
-
Then - Actions
- Set TempPos = (Position of (Picked unit))
- Set TempReal2 = (Distance between TempLoc and TempPos)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TempReal2 Less than TempReal
-
Then - Actions
- Custom script: call RemoveLocation (udg_TempPos2)
- Set TempPos2 = (Position of (Picked unit))
- Set TempReal = TempReal2
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation (udg_TempPos)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call RemoveLocation (udg_TempLoc)
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
- AI - Ignore (Picked unit)'s guard position
- Unit - Order (Picked unit) to Attack-Move To TempPos2
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TempGroup)
- Custom script: call RemoveLocation (udg_TempPos2)
-
Events
I cannot change the 'Guard Distance' in settings to infinite, as I also have creep camps in map, and I need them to stay on point instead of chasing after the player for whole map. I had hopes the AI - Ignore guard position will help me out, but it was unsuccesful.
Any ideas how to fix the problem?