Hello. I made a mission that reinforcements need to come. To create the reinforcements I use CreateUnit and CreateVehicle. Everything is fine, they are all created, but I don't know why so many BMPs are created. I only want 1 BMP with a crew in it, and then a squad enters ass ride in back. The BMP with the crew in it is created, but also something like 4-5 empty BMPs. I don't want the empty one. To create the reinforcements I use this script (or code, nevermind) in the on activation of a trigger which is activated only once (so only one bmp and 1 reinforments) and there isn't any loop as you can see:
_units2 = units east2
"_x setunitpos up" foreach _units2
"_x allowfleeing 0" foreach _units2
BMP = "BMP" CreateVehicle getpos G2
"OfficerE" CreateUnit [getpos G2, East2, "E10 = this", 1, "SERGEANT"]
"SoldierEG" CreateUnit [getpos G2, East2, "E11 = this", 1, "CORPORAL"]
"SoldierEB" CreateUnit [getpos G2, East2, "E12 = this", 1, "CORPORAL"]
"SoldierELaw" CreateUnit [getpos G2, East2, "E13 = this", 1, "CORPORAL"]
"SoldierEMG" CreateUnit [getpos G2, East2, "E14 = this", 1, "PRIVATE"]
"SoldierEB" CreateUnit [getpos G2, East2, "E15 = this", 1, "PRIVATE"]
"SoldierEB" CreateUnit [getpos G2, East2, "E16 = this", 1, "PRIVATE"]
"SoldierECrew" CreateUnit [getpos G2, East2, "E17 = this", 1, "PRIVATE"]
"SoldierECrew" CreateUnit [getpos G2, East2, "E18 = this", 1, "PRIVATE"]
"SoldierECrew" CreateUnit [getpos G2, East2, "E19 = this", 1, "PRIVATE"]
~2
E10 AssignAsCargo BMP; E11 AssignAsCargo BMP; E12 AssignAsCargo BMP; E13 AssignAsCargo BMP; E14 AssignAsCargo BMP; E15 AssignAsCargo BMP; E16 AssignAsCargo BMP; E17 AssignAsGunner BMP; E18 AssignAsCommander BMP; E19 AssignAsDriver BMP
[E10,E11,E12,E13,E14,E15,E16,E17,E18,E19] ordergetin true
~3
OBJ5 = True
If someone can tell me what is wrong and why there are so many BMPs i'll be glag
. At first I tought I could skip it, but one time the BMP couldn't move because the empty BMPs blocked it, so I decided to deal with it.
Thanks