Jump to content

Recommended Posts

I have a script that can be placed in the editor's console and it will log all atm positions to the clipboard. How would I use this for waypoints? I've tried _wp, _waypoint and even _move but still nothing is returned. Any help would be appreciated. Here is the ATM debug script:

 

_atms = [];
{
	if ((str _x) find ": atm_" != -1) then
	{
		_pos = _x modelToWorld [0,0,0];
		if (surfaceIsWater _pos) then
		{
			_pos = _pos vectorAdd ((getPosASL _x) vectorDiff (getPosASLW _x));
		};
		_atms pushBack _pos;
	};
} forEach nearestObjects [player, [], 999999];

copyToClipboard str _atms;

 

Share this post


Link to post
Share on other sites

nearestObjects doesn't support waypoints and it wont return them. If you need to get a list of all waypoints on the map then you need to use:

 

private _waypointPositions = [];
{
	private _group = _x;
	{
		private _wp = _x;	// this is not the same _x as above, we are in a different forEach scope
		_waypointPositions pushback (waypointPosition _wp);
	} forEach (waypoints _group);	// _x is current group
} forEach AllGroups;

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×