There are probably many ways to do this, and probably several good ones. Without knowing specifics of Desert Strike, I'd suggest you'll need to know:
(1) When are units spawned? If perioidic (based on game clock), use a Trigger that launches periodically. If it's by some other method, you'll need to explicitly call the spawning code from some other method that is controlling the temporal flow of your game. I'd recommend an Action called "Spawn Units for Player" that takes player as a parameter. Then you can call this via various methods - keeps things flexible.
(2) You'll need to figure out how many structures each player has and what types they are. I'd recommend using Pick Each Unit in Unit Group and then use All Units in Region Matching Condition. Give the function Entire Map as the region and the player owner. Then in your loop, use Unit Type to figure out the type and implement your spawn logic based on the information you gather using that method.
@N33b: Go
There are probably many ways to do this, and probably several good ones. Without knowing specifics of Desert Strike, I'd suggest you'll need to know:
(1) When are units spawned? If perioidic (based on game clock), use a Trigger that launches periodically. If it's by some other method, you'll need to explicitly call the spawning code from some other method that is controlling the temporal flow of your game. I'd recommend an Action called "Spawn Units for Player" that takes player as a parameter. Then you can call this via various methods - keeps things flexible.
(2) You'll need to figure out how many structures each player has and what types they are. I'd recommend using Pick Each Unit in Unit Group and then use All Units in Region Matching Condition. Give the function Entire Map as the region and the player owner. Then in your loop, use Unit Type to figure out the type and implement your spawn logic based on the information you gather using that method.