Where am I going wrong, I guess it's an issue calling them _spawn ?!
Thanks
I have searched the forums, Google, MSN, garage, shed, car, pockets, kitchen draws, pants, socks, down the sofa, under the bed, behind the Monitor, ashtray, belly button, cupboards, under cups, down the toilet, under the carpet, behind curtains, in Duvet cover, Wardrobe, inside the DVD player, searched the dog basket, "don't have a dog basket but I would have if I'd had one, and cannot find the answer to my question.
So here I am, on my hands and knees, begging for someone to have the answer to the question I may have posed above.
I have added a waypoint which works fine when spawning single units but when I try using the same way of adding a waypoint spawning a random unit it dosen't seem to work.
and the waypoint works fine, but it seems that using bis_fnc_spawnvehicle you can't name the group like using bis_fnc_spawnGroup, and using spawngroup dosen't spawn a random unit
Parameter(s):
_this select 0: desired position (Array).
_this select 1: desired azimuth (Number).
_this select 2: type of the vehicle (String).
_this select 3: side or existing group (Side or Group).
Returns:
Array:
0: new vehicle (Object).
1: all crew (Array of Objects).
2: vehicle's group (Group).
So, the problem is that you are using an array to add the waypoint, and not a group or vehicle.
Do something like this instead:
I used a Russian soldier with no ammo with this lot in it's init field
a1= group this; this hideobject true; this setcaptive true; this allowdamage false;
and in my test it works fine, though not a propper way to get it working
Just need to transfer this into the mission im making to make sure it still fits ok.
If anyone could explain exactly how to do this propperly I'd like to learn.
You will see on the BIS_fnc_spawnVehicle that using the command returns an array that is stored in the variable you call it with (you use _spawn).
Return Value:
Array - 0: created vehicle (Object), 1: all crew (Array of Objects), 2: vehicle's group (Group)
so _spawn is actually an array containing the following elements: [vehicle, crew, group]
Now you can use those three items you just have to select them which is what Neo was explaining.