help with addwaypoint

Inkko

Valued Member!
I'm trying to use addwaypoint to help direct a player to get to a spot but upon using it, it will create the waypoint but there is apparently another waypoint already so it creates a line from below kamenka to wherever I placed my waypoint.

How can I make it not create that line and instead maybe have the line from where they are to where I create a waypoint? or would there be a better way to do this?

Code:
waypnt = (group player) addwaypoint [destination,0];

xGGRzeGu5TXNK3WTK78rKOXlcYKZ1_PueWwXHQoU5xw
 
Last edited:
I noticed the same thing. The waypoint draws correctly on screen, but on the map it shows a line from position [0,0,0] to the new waypoint. [0,0,0] may be a waypoint automatically added to units when their group is first created.

To fix that you could try deleting all waypoints first.
Code:
deleteWaypoint [(group player),all];

If that doesn't work you may have to setWaypointPosition to the player's current position first and then delete it, as Saintolaf mentioned in his note:
https://community.bistudio.com/wiki/deleteWaypoint
Thanks for the reply ebay,

This code didn't actually end up working:
Code:
deleteWaypoint [(group player),all];

what I did was this and it seems to be working and it was on the wiki page as well:
Code:
while {(count (waypoints (group player))) > 0} do
{
    deleteWaypoint ((waypoints (group player)) select 0);
};
 
Back
Top