Aww come on - it's not that hard.
Let me explain a bit:
-
For each Integer A from 1 to x do:
is called an integer loop.
An integer generally is a variable to store i.e. the number of units in a unit group.
This integer loop repeats an action the number of times you set for x, means that if you set x to 10, it repeats ten times.
-
Set temppoint = *your spawnpoint*
Set a point-variable to this name (variables-editor) and use i.e.
-
Set temppoint = (Center of Region 001 <gen>)
to define the point to the center of Region 001
-
Unit - Create 1 *your unit* for Player y at temppoint facing default building degrees degrees
Means you create a unit at your newly set point (the center of Region 001) for a certain player.
Note, use player 1-12 for that as 'neutral passive' and 'neutral hostile' are bugged sometimes.
-
Set waypoint = *your desired point where the unit shall move to*
THis is basically the same as with temppoint, but this time you set i.e.
-
Set waypoint = (Center of Region 002 <gen>)
to define the point to the center of Region 002 - means the unit is ordered to move to the point you set (so in your case, the center of region 002) using
-
Unit - Order (last created unit) to move (or attack/move) to waypoint
.
Last but not least, we have to remove the so-called leaks to prevent you memory from filling up. This is done by using 'custom scripts'. There are plenty of those but now we only use it to remove the location you set for a)the spawning point and b)the waypoint.
-
Custom script: call RemoveLocation(udg_temppoint)
removes the location temppoint and
-
Custom script: call RemoveLocation(udg_waypoint)
removes, yeah, the waypoint
FInally i'd advise, you read this one, as it helps you to prevent further leaks in later triggers:
http://www.hiveworkshop.com/forums/f279/basic-memory-leaks-5889/