Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Coladebote

Generate a truck with AI troop

Recommended Posts

Hello guys:
I am trying to create a truck with AI reinforcement troops that appear at a point and follow a route (WP) until reaching the destination, the problem is that the truck does not appear and, therefore, the rest of the route is not executed. I'm sure I'm doing something wrong, but I don't know what. This is the script.

 

if (!isServer) exitWith {};

_mygroup = [getMarkerPos "r0",EAST,(configfile >> "CfgGroups" >> "East" >> "CUP_O_RU" >> "Motorized" >> "CUP_O_RU_MotInfSquad" >> "Unit12")] call BIS_fnc_spawnGroup;
//Searches Cfg Groups available via the editor https://community.bistudio.com/wiki/CfgGroups

_wp1 = _mygroup addWaypoint [getmarkerpos "r1", 0]; 
_wp1 setWaypointType "MOVE"; 
_wp1 setWaypointSpeed "FULL"; 
_wp1 setWaypointBehaviour "AWARE"; 
_wp1 setWaypointFormation "WEDGE";
_wp1 setWaypointCombatMode "GREEN";

_wp2 = _mygroup addWaypoint [getmarkerpos "r2", 1]; 
_wp2 setWaypointType "MOVE"; 
_wp2 setWaypointSpeed "FULL"; 
_wp2 setWaypointBehaviour "AWARE"; 
_wp2 setWaypointFormation "WEDGE";
_wp2 setWaypointCombatMode "GREEN";

_wp3 = _mygroup addWaypoint [getmarkerpos "r3", 2]; 
_wp3 setWaypointType "MOVE"; 
_wp3 setWaypointSpeed "FULL"; 
_wp3 setWaypointBehaviour "AWARE"; 
_wp3 setWaypointFormation "WEDGE";
_wp3 setWaypointCombatMode "GREEN";

_wp4 = _mygroup addWaypoint [getmarkerpos "r4", 3]; 
_wp4 setWaypointType "MOVE"; 
_wp4 setWaypointType "GETOUT"; 
_wp4 setWaypointSpeed "FULL"; 
_wp4 setWaypointBehaviour "AWARE"; 
_wp4 setWaypointFormation "WEDGE";
_wp4 setWaypointCombatMode "GREEN";


_wp5 = _mygroup addWaypoint [getmarkerpos "r5", 4]; 
_wp5 setWaypointType "MOVE"; 
_wp5 setWaypointSpeed "FULL"; 
_wp5 setWaypointBehaviour "AWARE"; 
_wp5 setWaypointFormation "WEDGE";
_wp5 setWaypointCombatMode "GREEN";

_wp6 = _mygroup addWaypoint [getmarkerpos "r6", 5]; 
_wp6 setWaypointType "MOVE"; 
_wp6 setWaypointSpeed "FULL"; 
_wp6 setWaypointBehaviour "COMBAT"; 
_wp6 setWaypointFormation "WEDGE";
_wp6 setWaypointCombatMode "RED";

_wp7 = _mygroup addWaypoint [getmarkerpos "r7", 6]; 
_wp7 setWaypointType "DESTROY"; 
_wp7 setWaypointSpeed "FULL"; 
_wp7 setWaypointBehaviour "COMBAT"; 
_wp7 setWaypointFormation "WEDGE";
_wp7 setWaypointCombatMode "RED";
_wp4 setWaypointType "SAD"; 


 

Can somebody help me. Thank you.

Share this post


Link to post
Share on other sites

Normal. The group config is (configfile >> "CfgGroups" >> "East" >> "CUP_O_RU" >> "Motorized" >> "CUP_O_RU_MotInfSquad") so you can't spawn the sub-class "unit12" with this function.

If you want to customize your group, units inside, their loadouts...  think about my module.

 

 

Share this post


Link to post
Share on other sites

I will test the new implementations of your module, thanks Pierre.

Share this post


Link to post
Share on other sites

×