In this case, why even move a region? You could just use "Create 1 Unit at Position of (Triggering Unit)..."
If you had mentioned, that the point should be always the position of the dying unit with an offset, we could have suggested this earlier ;) My approach was for units spawned at a specific location, which is not necessarily related to the position of the Nexus.
Well, even better. In this case, I would assign an index to each hatchery (possibly store it in the hatchery's custom value), then set up an array of points using the index of the hatchery as array index, so you can access the point directly from the dying unit:
//set up the hatcheries and points at map initializationEventsMapInitializationActionsPointArray[1]=location'a'SetCustomValueofHatchery"a"=1PointArray[2]=location'b'SetCustomValueofHatchery"b"=2...//the unit spawn triggerEventsAnyunitdiesConditionsUnittypeof(triggeringunit)=HatcheryActionsCreate1(whateveryouneed)atPointArray[CustomValueof(TriggeringUnit)]
If you place them in order within the editor, you can even abuse UnitFromId and PointFromId and a loop to save yourself the trouble of setting up all points individually.
There is an overall script memory limit, this includes triggers. Also there might be a separate limit for triggers. However, if you create your triggers per hand, you will most likely not reach it anytime soon, stuff like units are limited at 16.384, triggers could possibly be limited to a similar amount.
Also, there are most likely better solutions to your problem than creating a new trigger for every single new unit. I don't know your map, but you could probably use a single trigger and a database of unit types with associated indexes and whenever a unit dies, look up the index and spawn a unit of index+1 or something similar.
In this case, why even move a region? You could just use "Create 1 Unit at Position of (Triggering Unit)..."
If you had mentioned, that the point should be always the position of the dying unit with an offset, we could have suggested this earlier ;) My approach was for units spawned at a specific location, which is not necessarily related to the position of the Nexus.
Well, even better. In this case, I would assign an index to each hatchery (possibly store it in the hatchery's custom value), then set up an array of points using the index of the hatchery as array index, so you can access the point directly from the dying unit:
If you place them in order within the editor, you can even abuse UnitFromId and PointFromId and a loop to save yourself the trouble of setting up all points individually.
Does this make sense to you?
There is an overall script memory limit, this includes triggers. Also there might be a separate limit for triggers. However, if you create your triggers per hand, you will most likely not reach it anytime soon, stuff like units are limited at 16.384, triggers could possibly be limited to a similar amount.
Also, there are most likely better solutions to your problem than creating a new trigger for every single new unit. I don't know your map, but you could probably use a single trigger and a database of unit types with associated indexes and whenever a unit dies, look up the index and spawn a unit of index+1 or something similar.