I'm a little confused with what you are trying to do by reading your code. That's only natural though as you are only just learning to "speak" this language. I think I understand what your intent is but just wanted to say sorry if I mis understand.
Players pick a unit and then every 20 seconds one of these units will appear at each players base. So you need to keep track of each players choice and you need to keep track of each players base location.
For this you can use the variables:
- Base_Locations which is of type "point"
- Selected_Unit_Type which is of type "unit type"
When a player selects what unit type they want (marine, hellion, roach, zealot stalker etcetc) then you need to set the Selected_Unit_type variable to be the unit type they want.
I don't know how you chose what each players base location will be but you could have some way for them to chose or you could set it in the map initialization trigger.
then in a periodic event:
Every 20 seconds
for each integer Player_Number = 1 to 12
create 1 Selected_Unit_Type[Player_Number] at location Base_Locations[Player_Number] for player Player_Number