I have a mission where I want a random amount of FIA to spawn in random locations in a building. Each location has a unitPos ("UP","MIDDLE","DOWN") and direction associated with it in an array. Segment from array:
So I use the location and direction in my BIS_fnc_spawnGroup call.
_unit = [_temp select 0, WEST, ["B_G_Soldier_lite_F"],,,,,,(_temp select 2)] call BIS_fnc_spawnGroup;
with _temp being my temporary variable for the data (location, stance, direction).
Then I have to do this, which isn't working:
_x setUnitPos str(_temp select 1);
hint str(unitPos _x);
}forEach units _unit;
The hint returns "AUTO" which is the default setting if you haven't setUnitPos.
When I manually tell it a stance (i.e. "MIDDLE") it works properly, but I need the different stances for each location, so I can do it dynamically.
I have also tested with:
hint str(_temp select 1);
And it returns the proper stance.
I think there is some sort of type issue going on, but I can't seem to figure it out.
Let me know if you need any more information.