_qor 11 Posted January 12, 2014 Hey, so far I can spawn a BIS vehicle but cant give them waypoints. I tried with this: HDef1 = [getmarkerPos "heavyDefSB1", 0, "M2A2_EP1", West] call Bis_fnc_spawnvehicle; {_x setskill ["general",0.99];} foreach units HDef1; sleep 4; wp1 = HDef1 addWaypoint [getMarkerPos "hdSB1", 10]; wp1 setWaypointType "SAD"; wp1 setWaypointBehaviour "AWARE"; wp1 setWaypointFormation "VEE"; wp1 setWaypointSpeed "FULL"; wp1 setWaypointCombatMode "YELLOW"; Share this post Link to post Share on other sites
panther42 52 Posted January 12, 2014 take a look again at BIS_fnc_spawnvehicle... Return Value: Array - 0: created vehicle (Object), 1: all crew (Array of Objects), 2: vehicle's group (Group) Waypoints are assigned to groups. You need to use HDef1 select 2 HDef1grp = Hdef1 select 2; waypoint stuff here... And your setskill should also be on the units of the crew/group, not the returned array Share this post Link to post Share on other sites
_qor 11 Posted January 13, 2014 (edited) So I defined the return values: HDef1 = [getmarkerPos "heavyDefSB1", 300, "M2A2_EP1", West] call Bis_fnc_spawnvehicle; HDef1veh = HDef1 select 0; HDef1crw = HDef1 select 1; HDef1grp = HDef1 select 2; {_x setskill ["general",0.99];} foreach units HDef1crw; sleep 4; wp1 = HDef1grp addWaypoint [getMarkerPos "hdSB1", 10]; wp1 setWaypointType "SAD"; wp1 setWaypointBehaviour "AWARE"; wp1 setWaypointFormation "VEE"; wp1 setWaypointSpeed "FULL"; wp1 setWaypointCombatMode "YELLOW"; So it is working without having the setskill part. Cant find out whats wrong at that... Edited January 13, 2014 by _qoR Share this post Link to post Share on other sites
panther42 52 Posted January 13, 2014 (edited) units is a group or object command. either use: {_x setskill ["general",0.99];} foreach HDef1crw; - return is an array with the units or {_x setskill ["general",0.99];} foreach units HDef1grp; - return is a group reference Edited January 13, 2014 by panther42 Share this post Link to post Share on other sites