SHARE
TWEET

AI.sqf | Edited for MG-Maximus

Darihon Aug 20th, 2014 193 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private ["_HQ","_unitGroup","_squad1","_squad2","_squad3","_squad4","_squad5","_target"];
  2. // Basic Declaration
  3. _HQ = createCenter east; // Creates a center
  4. _unitGroup = createGroup east; // Makes a group
  5. EAST setfriend [WEST,0]; // Makes sure that the "EAST" is hostile.
  6. _target = [7027.7656, 7657.8701, 3.0517578e-005];
  7.  
  8.  
  9. // Spawns the AI
  10. _squad1 = _unitGroup createUnit ["Policeman",[7026.6099, 7667.5566, 3.0517578e-005], [], 10, "PRIVATE"];
  11. _squad2 = _unitGroup createUnit ["Policeman",[7026.186, 7668.7749, 0], [], 10, "PRIVATE"];
  12. _squad3 = _unitGroup createUnit ["Policeman",[7025.7593, 7669.873, 0], [], 10, "COLONEL"];
  13. _squad4 = _unitGroup createUnit ["Policeman",[7025.2358, 7671.1953, 0], [], 10, "PRIVATE"];
  14. _squad5 = _unitGroup createUnit ["Policeman",[7027.8037, 7670.0151, 0], [], 10, "PRIVATE"];
  15.  
  16. //Makes them hostile
  17. [_squad1,_squad2,_squad3,_squad4,_squad5] joinSilent _unitGroup;
  18.  
  19. /*
  20. Adds weapons to the AI. Customiseable on your likings. Just change the "AKS_74_U" to whatever gun you'd like.
  21. */
  22. _squad1 addweapon "AKS_74_U";
  23. _squad1 addmagazine "30Rnd_545x39_AK";
  24. _squad1 addmagazine "30Rnd_545x39_AK";
  25. _squad2 addweapon "AKS_74_U";
  26. _squad2 addmagazine "30Rnd_545x39_AK";
  27. _squad2 addmagazine "30Rnd_545x39_AK";
  28. _squad3 addweapon "AKS_74_U";
  29. _squad3 addmagazine "30Rnd_545x39_AK";
  30. _squad3 addmagazine "30Rnd_545x39_AK";
  31. _squad4 addweapon "AKS_74_U";
  32. _squad4 addmagazine "30Rnd_545x39_AK";
  33. _squad4 addmagazine "30Rnd_545x39_AK";
  34. _squad5 addweapon "AKS_74_U";
  35. _squad5 addmagazine "30Rnd_545x39_AK";
  36. _squad5 addmagazine "30Rnd_545x39_AK";
  37. _squad1 removeWeapon "ItemRadio";
  38. _squad2 removeWeapon "ItemRadio";
  39. _squad3 removeWeapon "ItemRadio";
  40. _squad4 removeWeapon "ItemRadio";
  41. _squad5 removeWeapon "ItemRadio";
  42.  
  43. // Sets their difficulty
  44. // Good
  45. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["aimingspeed", 1];
  46. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["spotdistance", 1];
  47. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["aimingaccuracy", 1];
  48. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["aimingshake", 0.2];
  49. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["spottime", 1];
  50. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["spotdistance", 1];
  51. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["commanding", 1];
  52. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["general", 1];
  53.  
  54. // Medium
  55. /*
  56. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["aimingspeed", 0.2];
  57. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["spotdistance", 0.2];
  58. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["aimingaccuracy", 0.2];
  59. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["aimingshake", 0.2];
  60. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["spottime", 0.4];
  61. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["spotdistance", 0.6];
  62. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["commanding", 0.6];
  63. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["general", 0.7];
  64. */
  65.  
  66. // Low
  67. /*
  68. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["aimingspeed", 0.15];
  69. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["spotdistance", 0.15];
  70. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["aimingaccuracy", 0.1];
  71. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["aimingshake", 0.1];
  72. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["spottime", 0.3];
  73. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["spotdistance", 0.5];
  74. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["commanding", 0.5];
  75. [_squad1,_squad2,_squad3,_squad4,_squad5] setSkill ["general", 0.6];
  76. */
  77.  
  78. //Behaviour
  79. [_squad1,_squad2,_squad3,_squad4,_squad5] enableAI "TARGET";
  80. [_squad1,_squad2,_squad3,_squad4,_squad5] enableAI "AUTOTARGET";
  81. [_squad1,_squad2,_squad3,_squad4,_squad5] enableAI "MOVE";
  82. [_squad1,_squad2,_squad3,_squad4,_squad5] enableAI "ANIM";
  83. [_squad1,_squad2,_squad3,_squad4,_squad5] enableAI "FSM";
  84. [_squad1,_squad2,_squad3,_squad4,_squad5] setCombatMode "RED";
  85. [_squad1,_squad2,_squad3,_squad4,_squad5] setBehaviour "COMBAT";
  86.  
  87. // Unit move -> bank
  88. [_squad1,_squad2,_squad3,_squad4,_squad5] moveTo _target;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top