I hate to be a bother again but I am really lost. I tinkered with the triggers on and off all day last night and this morning but couldn't find a solution. I was hoping perhaps someone could provide a visual example as well, since I understand those better than being told. I was advised to set up variables to track this additionally but I am unsure which ones I need for this trigger.
I'm trying to do a thing where if a unit type population goes below a certain threshold, the unit population will run a trigger to create a replacement for it. I know how to create the basics, like, every X seconds create said unit but I need it to be pretty specific. I also need to know how to set up a unit population cap since what I've tried just ain't it. So ideally in this game it would be more like:
Time of Day becomes 18.00 or 6.00
Unit population cap is X, game would check to see if the population is low enough to warrent creating the replacement units, otherwise, it won't do it once the time arrives to replace the dead units of the previous night. This is to help prevent too many units on the map since with each passing night a new population of unit types is introduced to the mix. The caps may or may not increase in size after so many nights passing though depending on future play testing.
Issue is I can get the units to spawn at the desired times but if I do 6.00, it will spawn the next night units in prematurely instead of waiting until the 18.00 time to begin alongside the previous night units who need replacing due to death and also will spawn too many of the units that need to be replaced. So instead of the population remaining a constant number, the already say 10 units will double into 20 [this also happens if I set the time spawn to 18.00 too]
I hope I'm wording things correctly. I can post visual examples of my triggers once I get access to my computer again if anyone desires. Any help would be appreciated.
I'm trying to do a thing where if a unit type population goes below a certain threshold, the unit population will run a trigger to create a replacement for it. I know how to create the basics, like, every X seconds create said unit but I need it to be pretty specific. I also need to know how to set up a unit population cap since what I've tried just ain't it. So ideally in this game it would be more like:
Time of Day becomes 18.00 or 6.00
Unit population cap is X, game would check to see if the population is low enough to warrent creating the replacement units, otherwise, it won't do it once the time arrives to replace the dead units of the previous night. This is to help prevent too many units on the map since with each passing night a new population of unit types is introduced to the mix. The caps may or may not increase in size after so many nights passing though depending on future play testing.
Issue is I can get the units to spawn at the desired times but if I do 6.00, it will spawn the next night units in prematurely instead of waiting until the 18.00 time to begin alongside the previous night units who need replacing due to death and also will spawn too many of the units that need to be replaced. So instead of the population remaining a constant number, the already say 10 units will double into 20 [this also happens if I set the time spawn to 18.00 too]
I hope I'm wording things correctly. I can post visual examples of my triggers once I get access to my computer again if anyone desires. Any help would be appreciated.