What may be just an interesting 'aside here'.
I discovered, much to my amazement, that player units (team units like footmen, knights, etc) will automatically run to the player start location using the Melee AI.
Meaning if you place the player start location of your enemy in the middle of the camp of your player, and spawn just footmen, knights, and other melee units - they will run to the camp.
-
Creep Spawn Alpha Copy
-
Events
-
Conditions
-
Actions
-
Set Creep_Spawn = (region, position of a destructible, position of a unit - wherever they are coming from. )
-
Set Point = (Region, position of... where ever you want them to go
-
For each (Integer A) from 1 to Number_of_Creeps, do (Actions)
-
Loop - Actions
-
Unit - Create 1 Random_Creep for Player 10 (Light Blue) at Creep_Spawn facing Default building facing degrees
-
Unit - Order (Last created unit) to Attack-Move To Point
-
Wait 2.00 seconds
-
Custom script: call RemoveLocation( udg_Creep_Spawn )
-
Custom script: call RemoveLocation( udg_Point )
Variables:
Creep_Spawn is a point variable, set to any location you desire, be it the position of a unit, the center of a region, blah.
Point is a point variable, again set to where ever you want.
Number_of_Creeps is an integer - you can use a number. If you set it as a variable you can manipulate that integer in other triggers - by using something like so:
-
Set Number_of_Creeps= (Number_of_Creeps+ 1)
Custom script there removes the point leaks created each time you run the trigger or create a unit at a point.
As an aside, or a foot note, if you have a lot of loops (For each integer) you can make variables for those
-
For each (Integer Dawn) from 1 to 250, do (Actions)
-
Loop - Actions
"Dawn" is a variable an is set using 'for each integer variable' This way if you have several things looping at the same time, or are sending enemies from more than one point, this will allow you better control of how many times a particular trigger loops.