The mission I'm planning is to have large numbers of enemy attacking the players position. Due to the large forces planned, I dont want to create every enemy group in the editor, and then have them slowly attack the players over time.
So I decided that I'd use createunit to create squads of enemy troops, and have them move to the attack.
I made a very simple script that created some units, and attached them to a lone man, who is a group already by himself.
Unfortunately, when my script runs, the whole game slows down to a stutter as it creates 7 units to fill out the group. This is obviously unacceptable in a mission. So Im wondering if there is a better way of creating groups, without massive slowdown.
For referance, the script I'm using is;
"BAS_GovernmentSoldier" createUnit [getpos enemystart, enemygroup, "", 0.6, "private"]
"BAS_GovernmentSoldier3" createUnit [getpos enemystart, enemygroup, "", 0.6, "private"]
"BAS_GovernmentSoldier4" createUnit [getpos enemystart, enemygroup, "", 0.6, "private"]
"BAS_GovernmentMGunner" createUnit [getpos enemystart3, enemygroup, "", 0.6, "private"]
"BAS_GovernmentRPGAPSoldier" createUnit [getpos enemystart4, enemygroup, "", 0.6, "private"]
"BAS_GovernmentMedic" createUnit [getpos enemystart, enemygroup, "", 0.6, "private"]
"BAS_GovernmentSoldier" createUnit [getpos enemystart, enemygroup, "", 0.6, "private"]
exit
[/size]