Jump to content
  • 0

Help pls AI patrol


lucho

Question

What i write in patrolpos?

nul=[grphunter, patrolpos, areasize, multi, targetside, typeofhunter, typeoftarget, flarecount]

 

- grphunter is the name of the patroling group
- patrolpos is the centre of the patrol, just place a empty H and give it a name
- areasize is the size of the area around the patrolpos in which the group will patrol
- multi is the multiplicator (of areasize) for the distance around the groupleader in which informations will be shared and received among the patrols. This also is the max. engagement range of the group !
- targetside is the side (west, east, resistance) of the possible targets of the patroling group
- typeofhunter is the type (take a look at CfgVehicles) of the patroling units (SoldierEB for all east units for example, can be different for some addons)
- typeoftarget is the type (take a look at CfgVehicles) of the possible targets (SoldierWB for all west units for example, can be different for some addons)
- flarecount is the number of flares the patroling group has, they will use them if a enemy is close enough (100m). Just give them 0 if you dont want that they use them. Flares will be spawned, no need for special weapons! 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

i think you can do it more easy in arma2oa editor 3d to start... once you finish it. u can use  as well,, or just replace your variables with the code writed by editor 3d-

i have something similar with editor 3d.

if u want make it as script , im working on something similar,, this spawns a group of 2 guys at 40mts around a raandom player...maybe u can take something for your work

Spoiler
  •   [format["<t size='0.75' color='#FFCC00'>>Check around you some guys wants to kill you</t>"],0,0,2,2] spawn BIS_fnc_dynamicText;
   
     
       
                _this = createCenter east;
                _this setFriend [west, 0];
                _this setFriend [civilian, 0];
                _center_1 = _this;   
     
                _guy1 = ["INS_Bardak","TK_INS_Bonesetter_EP1","TK_GUE_Soldier_MG_EP1","TK_CIV_Worker01_EP1"] call BIS_fnc_selectRandom;
                _weapon = ["MakarovSD","MP5SD"] call BIS_fnc_selectRandom;
     
                _group_1 = createGroup _center_1;
                           
                _guy1 = objNull;
            if (true) then{
               
                _this = _group_1 createUnit [_guy1, getPos player, [], 40, "CAN_COLLIDE"];
                _guy1 = _this;      
                removeAllWeapons _guy1;
                _guy1 addWeapon _weapon;
 
                _guy1 setUnitAbility 0.60000002;
 
               
                _guy1 addMagazine "8Rnd_9x18_MakarovSD";
                _guy1 addMagazine "8Rnd_9x18_MakarovSD";
                _guy1 addMagazine "8Rnd_9x18_MakarovSD";
                _guy1 addMagazine "30rnd_9x19_MP5SD";
                _guy1 addMagazine "30rnd_9x19_MP5SD";
                _guy1 addMagazine "30rnd_9x19_MP5SD";
                _guy1 addMagazine "ItemBriefcase50oz";
                _guy1 addMagazine "FoodSteakCooked";
                _guy1 addMagazine "ItemBloodbag";
                _guy1 addMagazine "ItemOilBarrel";
 
               
 
            };
               _unit_0 = objNull;
            if (true) then {
               _this = _group_1 createUnit ["INS_Woodlander1", getPos player, [], 40, "CAN_COLLIDE"];
               _unit_0 = _this;
               _this setUnitAbility 0.60000002;
               removeAllWeapons _unit_0;
               _unit_0 addWeapon _weapon;
               _unit_0 addMagazine "8Rnd_9x18_MakarovSD";
               _unit_0 addMagazine "8Rnd_9x18_MakarovSD";
               _unit_0 addMagazine "8Rnd_9x18_MakarovSD";
               _unit_0 addMagazine "30rnd_9x19_MP5SD";
               _unit_0 addMagazine "30rnd_9x19_MP5SD";
            };
               _this = _group_1 addWaypoint [getPos player, 0];
               _waypoint_0 = _this;        
                       
                sleep 150;
               [format["<t size='0.75' color='#FFCC00'>>guys get lost</t>"],0,0,2,2] spawn BIS_fnc_dynamicText;
               deleteVehicle _guy1;
               deleteVehicle _unit_0;          
           
                   

            };

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...