Not quite sure what's meant by spawning, but it’s certainly nice to introduce a few random chance appearances in a scenario. That way enemy units are not the same every time, or in the same place. But using just random chance scripts can produce unbalanced results - all, some or none of the units can turn up and so upset the balance of the game. This is a basic script I use to ensure that only one out of three possible units turns up.
Its basic foundations are;
Unit 1 and Unit 2 are present – Unit 1 is deleted
Unit 2 and Unit 3 are present – Unit 2 is deleted
Unit 1 and Unit 3 are present – Unit 3 is deleted
If only one unit is present – no action is needed
If all three units are present - the same two are arbitrarily deleted each time
If no units are present –the same one is arbitrarily added each time
https://drive.google.com/file/d/1K6oq9L ... sp=sharing An image of the Scenario Parameters top screen
1. Each of the three units is given a tag number when they appear. Via Unit Scripts these units have unique names (which are used in the triggers; Map Condition and Unit Action). They have a random chance of coming on (eg set to 35%) and are set to appear for only the single turn.
2. Should all three tags be generated a further tag is needed and created.
3. Should all three tags be generated this Remove Tag prevents all further combinations of tags 1 to 3 being created.
4. This is an arbitrary unit deletion of two units for when all three units do appear. Using the Scenario Parameters Unit Action with strength set to zero.
5. These tags are all the combinations of the two out of the three possible units appearing, each combination leaves a different unit in place via the Unit Action script at the end of the turn.
If none of the three key units come on (they come on by chance eg 35%) further script can be written to ensure an arbitrary arrival if none appear.
When the three units are key-units for reinforcements. The three groups of reinforcements which are each scheduled to arrive, each have a different key-unit as their trigger, and are set to do so on the next turn, but of course only one group will appear because of the scripting.
I realise my explaining could perhaps be clearer and there’s things I’ve not explained fully here. I’m understanding why the scenario editor manual may be a little sparse – one thing just leads into another. Also, there’s certainly more than one way to do things.