Hi,
I'm new to this so apologies if this is a simple problem.
I'm messing about with scripting and have created the below scrip, which works to a degree. The code is in a .sqf file and called by a trigger.
The waypoint is added but the waypoint line runs from the very bottom left of the map to the correct location, I can’t work out why the waypoint is not running from the group. Also the group does not respond to the waypoint.
Thanks for any help!
Scott
private "_unt";
private "_grp";
_grp = createGroup west;
for "_i" from 0 to 3 do
{
sol = round(random 3);
str_sol = "";
switch (sol) do {
case 1: {
str_sol = "USMC_Soldier_AR";
};
case 2: {
str_sol = "USMC_Soldier_MG";
};
case 3: {
str_sol = "USMC_Soldier_Medic";
};
default
{
str_sol = "USMC_Soldier";
};
};
_unt = _grp CreateUnit [str_sol,getMarkerPos "red_1",[],25,"FORM"];
};
[player] join group _unt;
wp1 = group _unt addwaypoint [(getmarkerpos "red_sd"),100];
wp1 setwaypointtype "DESTROY";
wp1 setwaypointBehaviour "AWARE";
hint "Reinforcements have arrived!";
Image
postimage.org/image/m30wwrm7l/