Jump to content
Sign in to follow this  
Spudgunner

Vehicle will not move when setting Waypoints dynamically

Recommended Posts

The vehicle will not move with this code for dynamically placing WP's. Can someone tell me What am I doing wrong here. It already has a driver mounted.

// Vehicle's Init field: nil = [] execVM "waypoint.sqf";//

// bwp1: marker//
// bus2: vehicle//

bus2 addWaypoint [getMarkerPos "bwp1", 0];
[bus2, 1] setWaypointType "MOVE";
bus2 setCurrentWaypoint [bus2, 1]; 

Share this post


Link to post
Share on other sites

addWaypoint requires a group as it's first argument.

_grp = group bus2;
_grp addWaypoint [getMarkerPos "bwp1", 1]; // 1 = waypoint order, 1 = second waypoint (0 = spawn)
[_grp, 1] setWaypointType "MOVE";  // 1 = completion radius.

Edited by kylania

Share this post


Link to post
Share on other sites

Last time I checked, waypoints index also begin with 0. Or do you have another waypoint created previously?

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
Sign in to follow this  

×