I'm trying to get SetWPPos to work, and I've never used it before. I believe I'm using it correctly, but the units just don't care where I reposition their waypoints -- they ALWAYS go to the predetermined one instead. Here's the script where I use it:
_crash_site = [[Rescue1, Rescue2, Rescue3, Rescue4, Rescue5, Rescue6, Rescue7, HeliWreck, DeadPilot], CrashBoundTL, CrashBoundBR] call randomly_position
hint format["Crash site is (%1, %2)", _crash_site select 0, _crash_site select 1]
; Initial orders
[group CaptureCrew, 2] SetWPPos _crash_site
I'm using a randomized position there -- the function generates a random position to all those units in that array, and then gives me the base position, which is stored in _crash_site. That hint statement prints it out correctly. Because it's random, I get different results each time, but I get things like:
"Crash site is (3288.4543, 4103.4903)"
To me it sounds like those two coordinates represent a valid position, so I should be able to use it with setWPPos; it doesn't work. Any ideas what I could be doing wrong?
Edit: I feel I left out too much. "CaptureCrew" is defined in the mission.sqm like so: class Item41
{
side="EAST";
class Vehicles
{
items=7;
class Item0
{
position[]={4630.314941,39.599998,3466.399658};
azimut=130.000000;
id=209;
side="EAST";
vehicle="JAM_EBOfficer";
leader=1;
rank="SERGEANT";
skill=1.000000;
text="CaptureCrew";
};
; Lots more items listed here.
};
class Waypoints
{
items=3;
class Item0
{
position[]={4629.698730,39.599998,3473.443848};
id=210;
type="GETIN";
class Effects
{
};
showWP="NEVER";
};
class Item1
{
position[]={5105.652832,219.321716,4109.590332};
type="GETOUT";
combatMode="RED";
formation="LINE";
combat="COMBAT";
class Effects
{
};
showWP="NEVER";
};
class Item2
{
position[]={5105.652832,222.190323,4149.777832};
type="SAD";
class Effects
{
};
showWP="NEVER";
};
};
};
and that code block is in init.sqs