Advertisement
Guest User

nuke.sqf

a guest
May 27th, 2014
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.16 KB | None | 0 0
  1.  
  2.  
  3. nukev=false;
  4.  
  5. nul = [lkcom] execVM "lk\menu\close_menu.sqf";
  6. //----------------------
  7. //----------------------
  8.  
  9. nul = [] execvm "lk\nuke\nuke_var.sqf";
  10. //----------------------
  11. //----------------------
  12.  
  13. hint "Click on the map to designate target-area";
  14.  
  15. nukepos = "HeliHEmpty" createVehicle (position player);
  16.  
  17.  
  18.  
  19.  
  20. _path = "\ca\air2\cruisemissile\";
  21. _pathS = _path + "data\scripts\";
  22.  
  23.  
  24. nukehold=true;
  25. titleText ["Click on the map to designate target-area","plain down"];
  26. onMapSingleClick "nukepos setPos _pos; nukehold=false";
  27. waituntil{!nukehold};
  28. onMapSingleClick "";
  29. titleText ["", "plain down"];
  30.  
  31. _dropPosition = getpos nukepos;
  32. nukemarker = createMarkerLocal ["nukemarker", position nukepos];
  33. hint "Nuclear Strike inbound at designated location";
  34. nul = [lkcom] execVM "lk\menu\close_menu.sqf";
  35. nukev=true;
  36.  
  37. nukemarker setmarkerposLocal getPos nukepos;
  38. nukemarker setMarkerTypeLocal "Destroy";
  39. nukemarker setMarkerTextLocal "Nuclear Strike";
  40. nukemarker setMarkerColorLocal "ColorRed";
  41.  
  42. _cruise = createVehicle ["Chukar",_dropPosition,[], 0, "FLY"];
  43. _cruise setVectorDir [ 0.1,- 1,+ 0.5];
  44. _cruise setPos [(getPos _cruise select 0),(getPos _cruise select 1),1000];
  45. _cruise setVelocity [0,2,0] ;
  46. _cruise flyInHeight 1000;
  47. _cruise setSpeedMode "FULL";
  48.  
  49. sleep 0.5;
  50. _dropPosX = _dropPosition select 0;
  51. _dropPosY = _dropPosition select 1;
  52. _dropPosZ = _dropPosition select 2;
  53.  
  54. _droppos1 = [_dropPosX + 4, _dropPosY + 4, _dropPosZ];
  55. _droppos2 = [_dropPosX + 8, _dropPosY + 8, _dropPosZ];
  56.  
  57. _planespawnpos = [_dropPosX , _dropPosY , _dropPosZ + 1000];
  58.  
  59. _misFlare = createVehicle ["cruiseMissileFlare1",_planespawnpos,[], 0, "NONE"];
  60. _misFlare inflame true;
  61. _cruise setVariable ["cruisemissile_level", false];
  62. [_cruise, _misFlare] execVM (_pathS + "cruisemissileflare.sqf");
  63. _cruise setObjectTexture [0, _path + "data\exhaust_flame_ca"];
  64. [_cruise] execVM (_pathS + "exhaust1.sqf");
  65. sleep 7;
  66.  
  67. waitUntil {!alive _cruise};
  68. nul = [nukepos] execvm "lk\nuke\nuke.sqf";
  69. nul = [nukepos] execvm "lk\nuke\damage.sqf";
  70. deletevehicle _misFlare;
  71. deletevehicle _cruise;
  72. //----------------------
  73. //----------------------
  74. quake = {
  75.  
  76. for "_i" from 0 to 140 do {
  77. _vx = vectorup _this select 0;
  78. _vy = vectorup _this select 1;
  79. _vz = vectorup _this select 2;
  80. _coef = 0.03 - (0.0001 * _i);
  81. _this setvectorup [
  82. _vx+(-_coef+random (2*_coef)),
  83. _vy+(-_coef+random (2*_coef)),
  84. _vz+(-_coef+random (2*_coef))
  85. ];
  86. sleep (0.01 + random 0.01);
  87. };
  88.  
  89. };
  90.  
  91.  
  92. wind = {
  93. while {windv} do {
  94. setwind [0.201112,0.204166,true];
  95. _ran = ceil random 2;
  96. playsound format ["wind_%1",_ran];
  97. _pos = position player;
  98.  
  99. //--- Dust
  100. setwind [0.201112*2,0.204166*2,false];
  101. _velocity = [random 10,random 10,-1];
  102. _color = [1.0, 0.9, 0.8];
  103. _alpha = 0.02 + random 0.02;
  104. _ps = "#particlesource" createVehicleLocal _pos;
  105. _ps setParticleParams [["\Ca\Data\ParticleEffects\Universal\universal.p3d", 16, 12, 8], "", "Billboard", 1, 3, [0, 0, -6], _velocity, 1, 1.275, 1, 0, [9], [_color + [0], _color + [_alpha], _color + [0]], [1000], 1, 0, "", "", _pos];
  106. _ps setParticleRandom [3, [30, 30, 0], [0, 0, 0], 1, 0, [0, 0, 0, 0.01], 0, 0];
  107. _ps setParticleCircle [0.1, [0, 0, 0]];
  108. _ps setDropInterval 0.01;
  109.  
  110. sleep (random 1);
  111. _delay = 1 + random 5;
  112. sleep _delay;
  113. deletevehicle _ps;
  114. };
  115. };
  116.  
  117.  
  118. envi = {
  119.  
  120. if (viewdistance < 3500) then {setviewdistance 3500};
  121. "colorCorrections" ppEffectAdjust [2, 30, 0, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];
  122. "colorCorrections" ppEffectCommit 0;
  123. //"colorCorrections" ppEffectAdjust [1, 1, 0, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];
  124. "colorCorrections" ppEffectAdjust [1, 0.8, -0.001, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];
  125. "colorCorrections" ppEffectCommit 3;
  126. "colorCorrections" ppEffectEnable true;
  127. "filmGrain" ppEffectEnable true;
  128. "filmGrain" ppEffectAdjust [0.02, 1, 1, 0.1, 1, false];
  129. "filmGrain" ppEffectCommit 5;
  130. };
  131.  
  132. ash = {
  133. _pos = position player;
  134. _parray = [
  135. /* 00 */ ["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 1],//"\Ca\Data\cl_water",
  136. /* 01 */ "",
  137. /* 02 */ "Billboard",
  138. /* 03 */ 1,
  139. /* 04 */ 4,
  140. /* 05 */ [0,0,0],
  141. /* 06 */ [0,0,0],
  142. /* 07 */ 1,
  143. /* 08 */ 0.000001,
  144. /* 09 */ 0,
  145. /* 10 */ 1.4,
  146. /* 11 */ [0.05,0.05],
  147. /* 12 */ [[0.1,0.1,0.1,1]],
  148. /* 13 */ [0,1],
  149. /* 14 */ 0.2,
  150. /* 15 */ 1.2,
  151. /* 16 */ "",
  152. /* 17 */ "",
  153. /* 18 */ vehicle player
  154. ];
  155. snow = "#particlesource" createVehicleLocal _pos;
  156. snow setParticleParams _parray;
  157. snow setParticleRandom [0, [10, 10, 7], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];
  158. snow setParticleCircle [0.0, [0, 0, 0]];
  159. snow setDropInterval 0.003;
  160.  
  161. };
  162. //----------------------
  163. //----------------------
  164. nul = [] execVM "lk\nuke\nenvi.sqf";
  165.  
  166.  
  167.  
  168. if (player distance nukepos < 2000) then {
  169.  
  170. setaperture 2;
  171.  
  172. "dynamicBlur" ppEffectEnable true;
  173. "dynamicBlur" ppEffectAdjust [0.5];
  174. "dynamicBlur" ppEffectCommit 3;
  175.  
  176. sleep 0.1;
  177.  
  178. "dynamicBlur" ppEffectAdjust [2];
  179. "dynamicBlur" ppEffectCommit 1;
  180.  
  181. "dynamicBlur" ppEffectAdjust [1];
  182. "dynamicBlur" ppEffectCommit 4;
  183. };
  184. nul = [nukepos] execvm "lk\nuke\damage.sqf";
  185. sleep 3;
  186. //*******************************************************************
  187. //*******************************************************************
  188.  
  189. _Cone = "#particlesource" createVehicleLocal getpos nukepos;
  190. _Cone setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 10, [0, 0, 0],
  191. [0, 0, 0], 0, 1.275, 1, 0, [40,80], [[0.25, 0.25, 0.25, 0], [0.25, 0.25, 0.25, 0.5],
  192. [0.25, 0.25, 0.25, 0.5], [0.25, 0.25, 0.25, 0.05], [0.25, 0.25, 0.25, 0]], [0.25], 0.1, 1, "", "", nukepos];
  193. _Cone setParticleRandom [2, [1, 1, 30], [1, 1, 30], 0, 0, [0, 0, 0, 0.1], 0, 0];
  194. _Cone setParticleCircle [10, [-10, -10, 20]];
  195. _Cone setDropInterval 0.005;
  196.  
  197. _top = "#particlesource" createVehicleLocal getpos nukepos;
  198. _top setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 21, [0, 0, 0],
  199. [0, 0, 65], 0, 1.7, 1, 0, [100,80,110], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", nukepos];
  200. _top setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
  201. _top setDropInterval 0.002;
  202.  
  203. _top2 = "#particlesource" createVehicleLocal getpos nukepos;
  204. _top2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 112, 0], "", "Billboard", 1, 22, [0, 0, 0],
  205. [0, 0, 60], 0, 1.7, 1, 0, [100,80,100], [[1, 1, 1, 0.5],[1, 1, 1, 0]], [0.07], 1, 1, "", "", nukepos];
  206. _top2 setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
  207. _top2 setDropInterval 0.002;
  208.  
  209. _smoke = "#particlesource" createVehicleLocal getpos nukepos;
  210. _smoke setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48, 1], "", "Billboard", 1, 25, [0, 0, 0],
  211. [0, 0, 70], 0, 1.7, 1, 0, [50,20,120],
  212. [[1, 1, 1, 0.4],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0]]
  213. , [0.5, 0.1], 1, 1, "", "", nukepos];
  214. _smoke setParticleRandom [0, [10, 10, 15], [15, 15, 7], 0, 0, [0, 0, 0, 0], 0, 0, 360];
  215. _smoke setDropInterval 0.002;
  216.  
  217. _Wave = "#particlesource" createVehicleLocal getpos nukepos;
  218. _Wave setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20/2, [0, 0, 0],
  219. [0, 0, 0], 0, 1.5, 1, 0, [50, 100], [[0.1, 0.1, 0.1, 0.5],
  220. [0.5, 0.5, 0.5, 0.5], [1, 1, 1, 0.3], [1, 1, 1, 0]], [1,0.5], 0.1, 1, "", "", nukepos];
  221. _Wave setParticleRandom [2, [20, 20, 20], [5, 5, 0], 0, 0, [0, 0, 0, 0.1], 0, 0];
  222. _Wave setParticleCircle [50, [-80, -80, 2.5]];
  223. _Wave setDropInterval 0.0002;
  224.  
  225.  
  226. _light = "#lightpoint" createVehicleLocal [((getpos nukepos select 0)),(getpos nukepos select 1),((getpos nukepos select 2)+800)];
  227. _light setLightAmbient[1500, 1200, 1000];
  228. _light setLightColor[1500, 1200, 1000];
  229. _light setLightBrightness 1000000.0;
  230.  
  231. //*******************************************************************
  232. //*******************************************************************
  233.  
  234. sleep 1.5*2;
  235.  
  236. _Wave setDropInterval 0.001;
  237. deletevehicle _top;
  238. deletevehicle _top2;
  239.  
  240.  
  241. sleep 3;
  242.  
  243. player spawn envi;
  244.  
  245.  
  246. player spawn quake;
  247.  
  248.  
  249. if (player distance nukepos < 1000) then {player say "nuke2s"};
  250. if (player distance nukepos > 1000) then {player say "nuke1s"};
  251.  
  252. sleep 1;
  253. setaperture -1;
  254.  
  255. _top3 = "#particlesource" createVehicleLocal getpos nukepos;
  256. _top3 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 24, [0, 0, 450],
  257. [0, 0, 49], 0, 1.7, 1, 0, [120,130,150], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", nukepos];
  258. _top3 setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
  259. _top3 setDropInterval 0.002;
  260. sleep 4;
  261. deletevehicle _top3;
  262.  
  263. sleep 4;
  264.  
  265. if (player distance nukepos < 4000) then {
  266. "dynamicBlur" ppEffectAdjust [0];
  267. "dynamicBlur" ppEffectCommit 1;
  268. };
  269.  
  270. _top4 = "#particlesource" createVehicleLocal getpos nukepos;
  271. _top4 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 22, [0, 0, 770],
  272. [0, 0, 30], 0, 1.7, 1, 0, [100,120,140], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", nukepos];
  273. _top4 setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
  274. _top4 setDropInterval 0.002;
  275. sleep 3;
  276.  
  277. _top4 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 25, [0, 0, 830],
  278. [0, 0, 30], 0, 1.7, 1, 0, [100,120,140], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", nukepos];
  279.  
  280.  
  281.  
  282. _Wave setDropInterval 0.001*10;
  283. _Wave setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20/2, [0, 0, 0],
  284. [0, 0, 0], 0, 1.5, 1, 0, [50, 100], [[0.1, 0.1, 0.1, 0.5],
  285. [0.5, 0.5, 0.5, 0.5], [1, 1, 1, 0.3], [1, 1, 1, 0]], [1,0.5], 0.1, 1, "", "", nukepos];
  286. _Wave setParticleCircle [50, [-40, -40, 2.5]];
  287.  
  288. player spawn ash;
  289. windv=true;
  290. player spawn wind;
  291. 30 setovercast 0.8;
  292.  
  293.  
  294.  
  295.  
  296. deleteVehicle _light;
  297.  
  298. 60 setRain 1;
  299.  
  300. sleep 4;
  301. deletevehicle _top4;
  302.  
  303. _i = 0;
  304. while {_i < 100} do
  305. {
  306. _light setLightBrightness (100.0 - _i)/100;
  307. _i = _i + 1;
  308. sleep 0.1;
  309. };
  310.  
  311.  
  312. for "_i" from 0 to 15 do {
  313. _smoke setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48, 1], "", "Billboard", 1, 25, [0, 0, 0],
  314. [0, 0, 60+_i], 0, 1.7, 1, 0, [40,15,120],
  315. [[1, 1, 1, 0.4],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0]]
  316. , [0.5, 0.1], 1, 1, "", "", nukepos];
  317. };
  318.  
  319.  
  320. _timeNow = time;
  321. waituntil {(time - _timeNow) > 180};
  322.  
  323. _smoke setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48, 1], "", "Billboard", 1, 25, [0, 0, 0],
  324. [0, 0, 30], 0, 1.7, 1, 0, [40,25+10,80],
  325. [[1, 1, 1, 0.2],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0]]
  326. , [0.5, 0.1], 1, 1, "", "", nukepos];
  327.  
  328. _smoke setDropInterval 0.012;
  329. _Cone setDropInterval 0.02;
  330. _Wave setDropInterval 0.01;
  331.  
  332. sleep 10;
  333. deleteVehicle _Wave;
  334. deleteVehicle _cone;
  335. deleteVehicle _smoke;
  336. deletevehicle snow;
  337.  
  338. sleep 300;
  339.  
  340.  
  341. "filmGrain" ppEffectEnable false;
  342. sleep 10;
  343. "colorCorrections" ppEffectEnable false;
  344. sleep 10;
  345. 60 setovercast 0;
  346. windv=false;
  347. setwind [0,0,true];
  348. //----------------------
  349. //----------------------
  350.  
  351. _target = nukepos;
  352.  
  353. deletemarkerlocal "nukemarker";
  354.  
  355.  
  356. _array = _target nearObjects ["Man", 1000];;
  357. {_x setdammage ((getdammage _x) + 1.0)} forEach _array;
  358.  
  359. _array = _target nearObjects ["Land", 1000];
  360. {_x setdammage ((getdammage _x) + 1.0)} forEach _array;
  361.  
  362. _array = _target nearObjects ["Ship", 1000];
  363. {_x setdammage ((getdammage _x) + 1.0)} forEach _array;
  364.  
  365. _array = _target nearObjects ["Motorcycle", 1000];
  366. {_x setdammage ((getdammage _x) + 1.0)} forEach _array;
  367.  
  368. _array = _target nearObjects ["Car", 1000];
  369. {_x setdammage ((getdammage _x) + 1.0)} forEach _array;
  370.  
  371. _array = _target nearObjects ["Air", 1000];
  372. {_x setdammage ((getdammage _x) + 0.5)} forEach _array;
  373.  
  374. _array = _target nearObjects ["Tank", 1000];
  375. {_x setdammage ((getdammage _x) + 1.0)} forEach _array;
  376.  
  377. _array = _target nearObjects ["Thing", 100];
  378. {_x setdammage ((getdammage _x) + 1.0)} forEach _array;
  379.  
  380. _array = _target nearObjects ["Static", 500];
  381. {_x setdammage ((getdammage _x) + 1.0)} forEach _array;
  382.  
  383. _array = _target nearObjects ["Strategic", 1000];
  384. {_x setdammage ((getdammage _x) + 1.0)} forEach _array;
  385.  
  386. _array = _target nearObjects ["NonStrategic", 1000];
  387. {_x setdammage ((getdammage _x) + 1.0)} forEach _array;
  388.  
  389.  
  390. _array = (nearestObjects [_target,[], 300]) - ((getPos _target) nearObjects 300);
  391. if dtree then {{DeleteCollection _x} forEach _array} else {{_x setdammage 1.0} forEach _array};
  392.  
  393.  
  394. sleep 7;
  395. _array = (_target nearObjects ["All", 1500]) - ((getPos _target) nearObjects 1000);
  396. {_x setdammage ((getdammage _x) + 0.4)} forEach _array;
  397.  
  398. nul = [_target] execVM "lk\nuke\radzone.sqf";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement