Random Placement of Units
Posted: Sat Aug 29, 2020 6:28 pm
I am working on a scenario where I want one side to have randomly place units. I think it will be best to have this as a function because I will want to use it repeatedly.
I want to set a series of boxes (let's call them 'zones") around an objective. On an irregular schedule I want units to spawn in these zones. I want the zones to be random and the units to be randomly placed within the zones.
For example: there are four zones called 'zone A', 'zone B', 'zone C', and 'zone D'. I will want the function to randomly select one of the zones then randomly place the desired units within the map reference points defined for the selected zone.
I have some ideas on how to do this but as I am not a programmer by trade I thought I would throw this out for the board.
I want to set a series of boxes (let's call them 'zones") around an objective. On an irregular schedule I want units to spawn in these zones. I want the zones to be random and the units to be randomly placed within the zones.
For example: there are four zones called 'zone A', 'zone B', 'zone C', and 'zone D'. I will want the function to randomly select one of the zones then randomly place the desired units within the map reference points defined for the selected zone.
I have some ideas on how to do this but as I am not a programmer by trade I thought I would throw this out for the board.