This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Personally I'd separate this into 2 triggers.
using a Global array of size 12
The first based of Unit uses ability (Build)
Actions
If Unit = X
Set var Global Array [Owner of (Triggering Unit) = X (number that you decide represent that unit)
---
Then on your Every 30 second Script
Every 30 seconds
For every intA from 1 to 12 increasing by 1 do if Global Array[intA] == X Then Create unit at X region.
This will ensure if you have a lot of checks it doesn't cause the game to freeze up.
Personally I'd separate this into 2 triggers.
using a Global array of size 12
The first based of Unit uses ability (Build)
Actions
If Unit = X
Set var Global Array [Owner of (Triggering Unit) = X (number that you decide represent that unit)
---Then on your Every 30 second Script
Every 30 seconds
For every intA from 1 to 12 increasing by 1 do
if Global Array[intA] == X
Then
Create unit at X region.
This will ensure if you have a lot of checks it doesn't cause the game to freeze up.