simicsko 4 Posted February 23, 2023 Hi all! There is such a convoy script, but for some reason it is only willing to work with blue vehicles. If I set the B_MRAP_01_F vehicle, they spawn and go in a column to the waypoint. However, if I set a red vehicle (e.g. O_MRAP_02_gmg_F), they spawn but do not even start the engine. What could be causing this? Here is the script: convoyGroup1=createGroup EAST; _ConvoyPos = "RedConv1_Init1"; for "_i" from 0 to 3 do { _newVeh="B_MRAP_01_F" createVehicle getMarkerPos _ConvoyPos; _newVeh setDir 110; _newVeh setConvoySeparation 20; createVehicleCrew _newVeh; [_newVeh] joinSilent convoyGroup1; sleep 0.5; }; _RC1wp1 = convoyGroup1 addWaypoint [getmarkerpos "RedConv1wp1", 0]; _RC1wp1 setWaypointType "MOVE"; _RC1wp1 setWaypointSpeed "FULL"; _RC1wp1 setWaypointBehaviour "COMBAT"; _RC1wp1 setWaypointFormation "COLUMN"; Thanks in advance. Share this post Link to post Share on other sites
pierremgi 4900 Posted February 24, 2023 Your code works when the created vehicle is same side than your group but you must pass the crew, not the vehicle for joinSilent command: something like: [] spawn { convoyGroup1=createGroup EAST; _ConvoyPos = "RedConv1_Init1"; for "_i" from 0 to 3 do { _newVeh= createVehicle ["O_MRAP_02_gmg_F",getMarkerPos _ConvoyPos,[], 0, "none"]; _newVeh setDir 110; _newVeh setConvoySeparation 20; createVehicleCrew _newVeh; crew _newVeh joinSilent convoyGroup1; sleep 0.5; }; _RC1wp1 = convoyGroup1 addWaypoint [getmarkerpos "RedConv1wp1", 0]; _RC1wp1 setWaypointType "MOVE"; _RC1wp1 setWaypointSpeed "FULL"; _RC1wp1 setWaypointBehaviour "COMBAT"; _RC1wp1 setWaypointFormation "COLUMN"; }; Note aside: you should use this alternative syntax avoiding a stack of exploding vehicle. Spawning all vehicles on the same spot is messy anyway because for head of convoy is spawning first, then is stuck by other vehicles. use several markers, name them "mk0", "mk1"... and spawn at getMarkerPos ("mk" + str _i) Share this post Link to post Share on other sites
simicsko 4 Posted February 24, 2023 4 hours ago, pierremgi said: Your code works when the created vehicle is same side than your group but you must pass the crew, not the vehicle for joinSilent command: something like: [] spawn { convoyGroup1=createGroup EAST; _ConvoyPos = "RedConv1_Init1"; for "_i" from 0 to 3 do { _newVeh= createVehicle ["O_MRAP_02_gmg_F",getMarkerPos _ConvoyPos,[], 0, "none"]; _newVeh setDir 110; _newVeh setConvoySeparation 20; createVehicleCrew _newVeh; crew _newVeh joinSilent convoyGroup1; sleep 0.5; }; _RC1wp1 = convoyGroup1 addWaypoint [getmarkerpos "RedConv1wp1", 0]; _RC1wp1 setWaypointType "MOVE"; _RC1wp1 setWaypointSpeed "FULL"; _RC1wp1 setWaypointBehaviour "COMBAT"; _RC1wp1 setWaypointFormation "COLUMN"; }; Note aside: you should use this alternative syntax avoiding a stack of exploding vehicle. Spawning all vehicles on the same spot is messy anyway because for head of convoy is spawning first, then is stuck by other vehicles. use several markers, name them "mk0", "mk1"... and spawn at getMarkerPos ("mk" + str _i) Thanks for the instructions, I'll try it in the evening and send you feedback. 😉 Share this post Link to post Share on other sites
simicsko 4 Posted February 24, 2023 11 hours ago, pierremgi said: Hello! There is some syntax error because I get the following error: ...Error Missing ) IF I try the apple method instead of the pear If I try getMarkerPos _ConvoyPos method instead of getMarkerPos ("RC1Spawn" + str _i), it works, but then, as you mentioned, the vehicles collide at the spawn. I don't see what's missing syntactically. Do you have an idea? The TypeSQF Editor writes that: Line 6: Syntax Error ("RC1Spawn" + str _i). [] spawn { convoyGroup1=createGroup EAST; for "_i" from 0 to 3 do { _newVeh = createVehicle ["O_MRAP_02_gmg_F", getMarkerPos ("RC1Spawn" + str _i) ,[], 0, "none"]; _newVeh setDir 110; _newVeh setConvoySeparation 20; createVehicleCrew _newVeh; crew _newVeh joinSilent convoyGroup1; sleep 0.5; }; _RC1wp1 = convoyGroup1 addWaypoint [getmarkerpos "RedConv1wp1", 0]; _RC1wp1 setWaypointType "MOVE"; _RC1wp1 setWaypointSpeed "FULL"; _RC1wp1 setWaypointBehaviour "COMBAT"; _RC1wp1 setWaypointFormation "COLUMN"; }; Share this post Link to post Share on other sites
pierremgi 4900 Posted February 24, 2023 Do you have 4 markers: RC1Spawn0 ... to RC1Spawn3 ? I don't have any problem with this code. Share this post Link to post Share on other sites
simicsko 4 Posted February 24, 2023 32 minutes ago, pierremgi said: Do you have 4 markers: RC1Spawn0 ... to RC1Spawn3 ? I don't have any problem with this code. Yes, 4 markers are created. The TypeSQF Editor writes that: Line 6: Syntax Error ("RC1Spawn" + str _i). Share this post Link to post Share on other sites
Harzach 2517 Posted February 24, 2023 12 hours ago, simicsko said: There is some syntax error because I get the following error: ...Error Missing ) When I copy/paste your code into TypeSQF, I get the same thing. When I paste it into a code block here, I see a corrupt character (red dot) in that position. If I clean that character and paste back into TypeSQF, all is well. ALWAYS USE CODE BLOCKS ON THE FORUM. 1 Share this post Link to post Share on other sites
Casio91Fin 31 Posted February 25, 2023 There might be this � you need to remove. Share this post Link to post Share on other sites
Harzach 2517 Posted February 25, 2023 7 minutes ago, Casio91Fin said: There might be this � you need to remove. I'm fairly certain it's the corrupt/invisible character I posted a screenshot of 😉 1 1 Share this post Link to post Share on other sites
simicsko 4 Posted February 25, 2023 11 hours ago, Harzach said: When I copy/paste your code into TypeSQF, I get the same thing. When I paste it into a code block here, I see a corrupt character (red dot) in that position. If I clean that character and paste back into TypeSQF, all is well. ALWAYS USE CODE BLOCKS ON THE FORUM. Ohh my God! Really! That made me joke! 😮 "ALWAYS USE CODE BLOCKS ON THE FORUM." -> All right. Thank you very much for your help! 😉 1 Share this post Link to post Share on other sites