If they're constantly created, I assume the previous "wave" will be removed when the next wave is created, is that right?
Assuming I'm right:
"Ships" is an empty unit group variable
"Shipyards" is an empty unit group variable
"TempShipyardGroup" is an empty unit group
" TempShipyard" is a unit variable
Trigger 1:
Events: every 70 seconds
Actions:
Unit group - pick every unit in "Ships" and do: remove picked unit from unit group
Create a "Ship" for "neutral" at "region 001"
Unit Group - Add last created unit to "Ships"
Trigger 2:
Events: unit finished constructing
Conditions: constructed unit type = Shipyard
Actions: Unit group - add last created unit to "Shipyards"
Trigger 3:
Events: a unit dies
conditions: unit type of dying unit = Shipyard
Actions: remove dying unit from "Shipyards"
Trigger 4:
Events: Every 1 seconds
Actions:
Pick every unit in "Ships" and do actions:
--- Set "TempShipyardGroup" = "Shipyards"
--- Loop : for each Integer A from 1 to (number of units in Shipyards) do actions:
------ Set "TempShipyard" = random unit in "TempUnitGroup"
------ Unit Group - remove "Tempshipyard" from "TempShipyardGroup"
------ If (real) range between Position of "Tempshipyard" and Position of "picked unit" = 200, Create a "Peasant" for owner of "Tempshipyard", else: do nothing.
The last trigger leaks 2 point variables and 1 unit group every second. I didn't include the custom scripts / variables because it's not up to me to fix leaks in your map.
The first trigger probably leaks a unit group too - not sure of that
I hope the trigger works, but I'm not sure if the loop works though
Note that if ships are destructible, you need to remove them from the 'Ships' unit group. Also note that every second the ship remains at the shipyard, a peasant will be created. Therefor it'd be useful to check if there are peasants near the shipyard, and if that's true, no new peasant should be created.