Krieg949M40 0 Posted November 14, 2020 Hi there, beginner here I'm trying to make a mission with a supply truck route that repeatedly spawns new trucks when one gets to the end. So it'll start the route, and when at a certain point, it'll spawn another one at the start via a trigger that then gets the same waypoints. Quote _grp1 = [getMarkerPos "truckSpawn", 0, "BNB_FA_NAF_Scania_Utility_Woodland", west] call BIS_fnc_spawnVehicle; _wp1 = _grp1 addWaypoint [getMarkerPos "truckMove1", 1]; _wp1 setWaypointType "MOVE"; This is the code I'm using. The vehicle spawns, with crew, as normal, but I get this error; Quote _wp1 = _grp1 |#|addWaypoint [getMarkerPos "truckMove1", 1]; Error Generic error in expression That means the syntax is wrong, right? But, according to wiki article about 'addWaypoint', it looks fine. Am I just blind? Share this post Link to post Share on other sites
RCA3 586 Posted November 14, 2020 Hi and welcome, Krieg, Your addWaypoint syntax is correct but you need to review the BIS_fnc_spawnVehicle syntax: Return Value: Array format [createdVehicle, crew, group]: createdVehicle: Object - the created vehicle crew: Array of Objects - the vehicle's crew members group: Group - created or passed group So: _result = [getMarkerPos "truckSpawn", 0, "BNB_FA_NAF_Scania_Utility_Woodland", west] call BIS_fnc_spawnVehicle; _grp1 = _result select 2; _wp1 = _grp1 addWaypoint [getMarkerPos "truckMove1", 1]; _wp1 setWaypointType "MOVE"; Cheers. Share this post Link to post Share on other sites
Krieg949M40 0 Posted November 14, 2020 Huh. It did spawn correctly, so I didn't think about the spawnVehicle code. Seems to work now. Thanks a lot! Share this post Link to post Share on other sites