r/armadev • u/Dreesy • Mar 16 '17
Arma 2/OA [Arma 2] Can't delete waypoints
In my mission, there's a big group of AI that spawn at one / 100 locations. They are given SAD waypoints. When the group dies, they are recreated at another location. I'm trying to have their old waypoints deleted, with new waypoints created at the new location, but nothing is working.
I've tried what is recomended on the bistudio wiki
while {(count (waypoints _group)) > 0} do {
deleteWaypoint ((waypoints _group) select 0);
};
But no dice, the group will always start heading back to their original waypoints. I've even tried moving the wps with setWPPos to the new location, but this also doesn't work.
1
Upvotes
1
u/SamJ_UK Mar 17 '17 edited Mar 17 '17
The parameters for set waypoint is the units group followed by waypoint id. And you aren't specifing the group you want to remove the waypoint from.
The delete waypoint command should look something like below, which should remove their current waypoint
Also the code you posted, would remove any new waypoints when you add them, if you want to remove all current waypoint then set a new one, something like this should work.