Mirek 166 Posted October 29, 2020 Hallo arma coders, i have an issue. I have plane Caled Valk_1, with driver called Valk_1D, i have trigger on radio foxtrot and markers "WPM_1 - WPM_3 . I have code in On act field of the trigger: WPV_1 = Valk_1D addWaypoint [getMarkerPos "WPM_1",0]; WPV_1 setWaypointType "MOVE"; WPV_1 setWaypointCompletionRadius 30; WPV_2 = Valk_1D addWaypoint [getMarkerPos "WPM_2",1]; WPV_2 setWaypointType "TR UNLOAD"; WPV_2 setWaypointCompletionRadius 30; WPV_3 = Valk_1D addWaypoint [getMarkerPos "WPM_3",2]; WPV_3 setWaypointType "MOVE"; WPV_3 setWaypointCompletionRadius 300; WPV_3 setWaypointStatements ["true", "{ deleteVehicle _x }forEach units Valk_1D;"]; But when i fire the trigger i get error in expression, wich doesnt make sense cause i have the code correct or at least i cannot see any problem in my code. It is exactly as in the wiki. "_wp =_grp addWaypoint [position player, 0];" i tried to have all zeroes at the end and i tried to have 0-2 as seen above. doesnt work. Maybe iam just tired, it is after midnight here, but i cannot see what the hell is wrong. Share this post Link to post Share on other sites
Harzach 2507 Posted October 29, 2020 https://community.bistudio.com/wiki/addWaypoint Quote Parameters: groupName: Group You are trying to add waypoints to a unit, not a group. Also, your three waypoints have random spawn radii of 0,1, and 2 meters respectively. 2 1 Share this post Link to post Share on other sites
Schatten 267 Posted October 29, 2020 @Mirek, try to pass to addWaypoint command group not unit: WPV_1 = (group Valk_1D) addWaypoint [getMarkerPos "WPM_1", 0]; 2 1 Share this post Link to post Share on other sites
Harzach 2507 Posted October 29, 2020 The parentheses are unnecessary 👍 1 Share this post Link to post Share on other sites
Harzach 2507 Posted October 29, 2020 Also, the second parameter is waypoint spawn radius, not index. Waypoints are indexed correctly as they are created, no need to use the third (index) param unless you are adding new waypoints between existing ones. You can use a value of -1 if you want the waypoint exactly where the marker's center is. 1 1 Share this post Link to post Share on other sites
Mirek 166 Posted October 30, 2020 Ok guys, i owerlooked the group thing. Thank you all a million. 1 Share this post Link to post Share on other sites