- Joined
- Jan 20, 2019
- Messages
- 3
Hello, in my map, you make units and while they are in a area they can be sent via a spell to attack a target. When they are sent to attack a target, the units themselves don't attack (think Pokemon Defense or Legion TD type of system), but neutrals of the same units spawn to attack move to the point. I would also need it to add/remove the units correctly when they are inside or outside the corresponding area.
The main issue I have so far is properly creating the exact units that should be in the group (or box in the map). It creates the right amount, just not the right units.
Here's the basis of what I have so far:
These are three different triggers.
Thanks in advance for the help, I greatly appreciate it.
The main issue I have so far is properly creating the exact units that should be in the group (or box in the map). It creates the right amount, just not the right units.
Here's the basis of what I have so far:
-
Green Setup
-
Events
-
Unit - A unit enters Green Spawn <gen>
-
Conditions
-
((Entering unit) belongs to an ally of (Owner of (Entering unit))) Equal to True
-
Actions
-
Set Temp_Unit = (Entering unit)
-
Unit Group - Add Temp_Unit to GreenSummon_Group
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to Dialog_Buttons2[1]
-
Then - Actions
-
Set Point_Green = (Center of Green Autospawns <gen>)
-
Set Point_Green2 = (Center of Red Mage Spot <gen>)
-
Unit - Create (Number of units in GreenSummon_Group) (Unit-type of Temp_Unit) for Player 15 (Turquoise) at Point_Green facing Default building facing degrees
-
Unit Group - Order (Last created unit group) to Attack-Move To Point_Green2
-
Unit Group - Remove all units from (Last created unit group)
-
Custom script: call RemoveLocation(udg_Point_Green)
-
Custom script: call RemoveLocation(udg_Point_Green2)
-
Custom script: call DestroyGroup(udg_UnitGroup_Green)
-
Else - Actions
-
Do nothing
-
Green Leave
-
Events
-
Unit - A unit leaves Green Spawn <gen>
-
Conditions
-
Actions
-
Unit Group - Remove (Leaving unit) from GreenSummon_Group
These are three different triggers.
Thanks in advance for the help, I greatly appreciate it.
Last edited: