Advertisement
Guest User

Untitled

a guest
May 16th, 2014
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.80 KB | None | 0 0
  1.  
  2. //AIRCRAFT spawns
  3. _randomarray1 = [1,2,3,4,5];
  4. _randomtype = _randomarray1 select (floor (random (count _randomarray1)));
  5. objective1 = "spawn";
  6. _randx = (random 2000) - 1000;
  7. _randy = (random 2000) - 1000;
  8. _newpos = [(getmarkerpos objective1 select 0) + _randx, (getmarkerpos objective1 select 1) + _randy,0];
  9. _enemyairarray = [0,1];
  10. _enemyairtype = _enemyairarray select (floor (random (count _enemyairarray)));
  11. if(_enemyairtype==0) then{
  12. if(_randomtype==1) then{
  13. _vehicle1 = [(getpos airspawn1), floor(random 360), "O_Heli_Attack_02_F", EAST] call bis_fnc_spawnvehicle;
  14. {
  15. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  16. _wp setWaypointType "MOVE";
  17. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  18. _wp2 setWaypointType "MOVE";
  19. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  20. _wp3 setWaypointType "MOVE";
  21. _wp4 = group _x addWaypoint [position _x, 0];
  22. _wp4 setWaypointType "CYCLE";
  23. } foreach [_vehicle1 select 0];
  24. _aircraft1 = _vehicle1 select 0;
  25. _vehicle2 = [(getpos airspawn2), floor(random 360), "O_Heli_Attack_02_F", EAST] call bis_fnc_spawnvehicle;
  26. {
  27. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  28. _wp setWaypointType "MOVE";
  29. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  30. _wp2 setWaypointType "MOVE";
  31. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  32. _wp3 setWaypointType "MOVE";
  33. _wp4 = group _x addWaypoint [position _x, 0];
  34. _wp4 setWaypointType "CYCLE";
  35. } foreach [_vehicle2 select 0];
  36. _aircraft2 = _vehicle2 select 0;
  37. _aircraft1 removeweapon "missiles_scalpel";
  38. _aircraft2 removeweapon "missiles_scalpel";
  39. };
  40. if(_randomtype==2) then{
  41. _vehicle1 = [(getpos airspawn3), floor(random 360), "O_Mi24_V", EAST] call bis_fnc_spawnvehicle;
  42. {
  43. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  44. _wp setWaypointType "MOVE";
  45. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  46. _wp2 setWaypointType "MOVE";
  47. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  48. _wp3 setWaypointType "MOVE";
  49. _wp4 = group _x addWaypoint [position _x, 0];
  50. _wp4 setWaypointType "CYCLE";
  51. } foreach [_vehicle1 select 0];
  52. _aircraft1 = _vehicle1 select 0;
  53. _vehicle2 = [(getpos airspawn4), floor(random 360), "O_Mi24_V", EAST] call bis_fnc_spawnvehicle;
  54. {
  55. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  56. _wp setWaypointType "MOVE";
  57. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  58. _wp2 setWaypointType "MOVE";
  59. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  60. _wp3 setWaypointType "MOVE";
  61. _wp4 = group _x addWaypoint [position _x, 0];
  62. _wp4 setWaypointType "CYCLE";
  63. } foreach [_vehicle2 select 0];
  64. _aircraft2 = _vehicle2 select 0;
  65. _aircraft1 removeweapon "AT6Launcher";
  66. _aircraft2 removeweapon "AT6Launcher";
  67. };
  68. if(_randomtype==3) then{
  69. _vehicle1 = [(getpos airspawn5), floor(random 360), "PLA_WZ35", EAST] call bis_fnc_spawnvehicle;
  70. {
  71. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  72. _wp setWaypointType "MOVE";
  73. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  74. _wp2 setWaypointType "MOVE";
  75. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  76. _wp3 setWaypointType "MOVE";
  77. _wp4 = group _x addWaypoint [position _x, 0];
  78. _wp4 setWaypointType "CYCLE";
  79. } foreach [_vehicle1 select 0];
  80. _aircraft1 = _vehicle1 select 0;
  81. _vehicle2 = [(getpos airspawn6), floor(random 360), "PLA_WZ35", EAST] call bis_fnc_spawnvehicle;
  82. {
  83. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  84. _wp setWaypointType "MOVE";
  85. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  86. _wp2 setWaypointType "MOVE";
  87. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  88. _wp3 setWaypointType "MOVE";
  89. _wp4 = group _x addWaypoint [position _x, 0];
  90. _wp4 setWaypointType "CYCLE";
  91. } foreach [_vehicle2 select 0];
  92. _aircraft2 = _vehicle2 select 0;
  93. _aircraft1 removeweapon "missiles_scalpel";
  94. _aircraft2 removeweapon "missiles_scalpel";
  95. };
  96. if(_randomtype==4) then{
  97. _vehicle1 = [(getpos airspawn7), floor(random 360), "SUD_MI48_RU", EAST] call bis_fnc_spawnvehicle;
  98. {
  99. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  100. _wp setWaypointType "MOVE";
  101. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  102. _wp2 setWaypointType "MOVE";
  103. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  104. _wp3 setWaypointType "MOVE";
  105. _wp4 = group _x addWaypoint [position _x, 0];
  106. _wp4 setWaypointType "CYCLE";
  107. } foreach [_vehicle1 select 0];
  108. _aircraft1 = _vehicle1 select 0;
  109.  
  110. _vehicle2 = [(getpos airspawn8), floor(random 360), "SUD_MI48_RU", EAST] call bis_fnc_spawnvehicle;
  111. {
  112. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  113. _wp setWaypointType "MOVE";
  114. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  115. _wp2 setWaypointType "MOVE";
  116. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  117. _wp3 setWaypointType "MOVE";
  118. _wp4 = group _x addWaypoint [position _x, 0];
  119. _wp4 setWaypointType "CYCLE";
  120. } foreach [_vehicle2 select 0];
  121. _aircraft2 = _vehicle2 select 0;
  122. _aircraft1 removeweapon "missiles_scalpel";
  123. _aircraft2 removeweapon "missiles_scalpel";
  124. };
  125. if(_randomtype==5) then{
  126. _vehicle1 = [(getpos airspawn9), floor(random 360), "O_Heli_Light_02_F", EAST] call bis_fnc_spawnvehicle;
  127. {
  128. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  129. _wp setWaypointType "MOVE";
  130. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  131. _wp2 setWaypointType "MOVE";
  132. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  133. _wp3 setWaypointType "MOVE";
  134. _wp4 = group _x addWaypoint [position _x, 0];
  135. _wp4 setWaypointType "CYCLE";
  136. } foreach [_vehicle1 select 0];
  137. _aircraft1 = _vehicle1 select 0;
  138. _vehicle2 = [(getpos airspawn10), floor(random 360), "O_Heli_Light_02_F", EAST] call bis_fnc_spawnvehicle;
  139. {
  140. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  141. _wp setWaypointType "MOVE";
  142. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  143. _wp2 setWaypointType "MOVE";
  144. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  145. _wp3 setWaypointType "MOVE";
  146. _wp4 = group _x addWaypoint [position _x, 0];
  147. _wp4 setWaypointType "CYCLE";
  148. } foreach [_vehicle2 select 0];
  149. _aircraft2 = _vehicle2 select 0;
  150. _aircraft1 removeweapon "missiles_dagr";
  151. _aircraft2 removeweapon "missiles_dagr";
  152. };
  153. };
  154. if(_enemyairtype==1) then{
  155. if(_randomtype==1) then{
  156. _vehicle1 = [(getpos airspawn1), floor(random 360), "O_Plane_CAS_02_F", EAST] call bis_fnc_spawnvehicle;
  157. {
  158. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  159. _wp setWaypointType "MOVE";
  160. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  161. _wp2 setWaypointType "MOVE";
  162. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  163. _wp3 setWaypointType "MOVE";
  164. _wp4 = group _x addWaypoint [position _x, 0];
  165. _wp4 setWaypointType "CYCLE";
  166. } foreach [_vehicle1 select 0];
  167. _aircraft1 = _vehicle1 select 0;
  168. _vehicle2 = [(getpos airspawn2), floor(random 360), "O_Plane_CAS_02_F", EAST] call bis_fnc_spawnvehicle;
  169. {
  170. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  171. _wp setWaypointType "MOVE";
  172. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  173. _wp2 setWaypointType "MOVE";
  174. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  175. _wp3 setWaypointType "MOVE";
  176. _wp4 = group _x addWaypoint [position _x, 0];
  177. _wp4 setWaypointType "CYCLE";
  178. } foreach [_vehicle2 select 0];
  179. _aircraft2 = _vehicle2 select 0;
  180. _aircraft1 removeweapon "Missile_AGM_01_Plane_CAS_02_F";
  181. _aircraft2 removeweapon "Missile_AGM_01_Plane_CAS_02_F";
  182. };
  183. if(_randomtype==2) then{
  184. _vehicle1 = [(getpos airspawn3), floor(random 360), "PLA_J30_CAS", EAST] call bis_fnc_spawnvehicle;
  185. {
  186. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  187. _wp setWaypointType "MOVE";
  188. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  189. _wp2 setWaypointType "MOVE";
  190. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  191. _wp3 setWaypointType "MOVE";
  192. _wp4 = group _x addWaypoint [position _x, 0];
  193. _wp4 setWaypointType "CYCLE";
  194. } foreach [_vehicle1 select 0];
  195. _aircraft1 = _vehicle1 select 0;
  196. _vehicle2 = [(getpos airspawn4), floor(random 360), "PLA_J30_CAS", EAST] call bis_fnc_spawnvehicle;
  197. {
  198. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  199. _wp setWaypointType "MOVE";
  200. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  201. _wp2 setWaypointType "MOVE";
  202. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  203. _wp3 setWaypointType "MOVE";
  204. _wp4 = group _x addWaypoint [position _x, 0];
  205. _wp4 setWaypointType "CYCLE";
  206. } foreach [_vehicle2 select 0];
  207. _aircraft2 = _vehicle2 select 0;
  208. _aircraft1 removeweapon "missiles_scalpel";
  209. _aircraft2 removeweapon "missiles_scalpel";
  210. };
  211. if(_randomtype==3) then{
  212. _vehicle1 = [(getpos airspawn5), floor(random 360), "Su25_bomb", EAST] call bis_fnc_spawnvehicle;
  213. {
  214. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  215. _wp setWaypointType "MOVE";
  216. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  217. _wp2 setWaypointType "MOVE";
  218. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  219. _wp3 setWaypointType "MOVE";
  220. _wp4 = group _x addWaypoint [position _x, 0];
  221. _wp4 setWaypointType "CYCLE";
  222. } foreach [_vehicle1 select 0];
  223. _aircraft1 = _vehicle1 select 0;
  224. _vehicle2 = [(getpos airspawn6), floor(random 360), "Su25_bomb", EAST] call bis_fnc_spawnvehicle;
  225. {
  226. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  227. _wp setWaypointType "MOVE";
  228. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  229. _wp2 setWaypointType "MOVE";
  230. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  231. _wp3 setWaypointType "MOVE";
  232. _wp4 = group _x addWaypoint [position _x, 0];
  233. _wp4 setWaypointType "CYCLE";
  234. } foreach [_vehicle2 select 0];
  235. _aircraft2 = _vehicle2 select 0;
  236. };
  237. if(_randomtype==4) then{
  238. _vehicle1 = [(getpos airspawn7), floor(random 360), "JS_JC_SU35", EAST] call bis_fnc_spawnvehicle;
  239. {
  240. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  241. _wp setWaypointType "MOVE";
  242. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  243. _wp2 setWaypointType "MOVE";
  244. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  245. _wp3 setWaypointType "MOVE";
  246. _wp4 = group _x addWaypoint [position _x, 0];
  247. _wp4 setWaypointType "CYCLE";
  248. } foreach [_vehicle1 select 0];
  249. _aircraft1 = _vehicle1 select 0;
  250. _vehicle2 = [(getpos airspawn8), floor(random 360), "JS_JC_SU35", EAST] call bis_fnc_spawnvehicle;
  251. {
  252. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  253. _wp setWaypointType "MOVE";
  254. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  255. _wp2 setWaypointType "MOVE";
  256. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  257. _wp3 setWaypointType "MOVE";
  258. _wp4 = group _x addWaypoint [position _x, 0];
  259. _wp4 setWaypointType "CYCLE";
  260. } foreach [_vehicle2 select 0];
  261. _aircraft2 = _vehicle2 select 0;
  262. _aircraft1 removeweapon "js_w_su35_kh29Launcher";
  263. _aircraft2 removeweapon "js_w_su35_kh29Launcher";
  264. };
  265. if(_randomtype==5) then{
  266. _vehicle1 = [(getpos airspawn9), floor(random 360), "Su25_bomb", EAST] call bis_fnc_spawnvehicle;
  267. {
  268. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  269. _wp setWaypointType "MOVE";
  270. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  271. _wp2 setWaypointType "MOVE";
  272. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  273. _wp3 setWaypointType "MOVE";
  274. _wp4 = group _x addWaypoint [position _x, 0];
  275. _wp4 setWaypointType "CYCLE";
  276. } foreach [_vehicle1 select 0];
  277. _aircraft1 = _vehicle1 select 0;
  278. _vehicle2 = [(getpos airspawn10), floor(random 360), "Su25_bomb", EAST] call bis_fnc_spawnvehicle;
  279. {
  280. _wp = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  281. _wp setWaypointType "MOVE";
  282. _wp2 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  283. _wp2 setWaypointType "MOVE";
  284. _wp3 = group _x addWaypoint [[(_newpos select 0) + (random 1800 - 900), (_newpos select 1) + (random 1800 - 900), 0],0];
  285. _wp3 setWaypointType "MOVE";
  286. _wp4 = group _x addWaypoint [position _x, 0];
  287. _wp4 setWaypointType "CYCLE";
  288. } foreach [_vehicle2 select 0];
  289. _aircraft2 = _vehicle2 select 0;
  290. };
  291. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement