Advertisement
Guest User

mp_deathrun_illusion.gsc

a guest
Aug 21st, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.80 KB | None | 0 0
  1. /*
  2. .... ..... ...... ...
  3. . . ............. . .
  4. . ............... . .
  5. . . . ...... ... . .
  6. . . .. .. ... . ..
  7. .MMMMMMM.. ...MMM. ..MMMMMMMO. OMM~. ,MMMMMMMM.. ,MZ ..7MMMMMM, .MMMMMMMM.
  8. .MI....MM~. ..MM8M. . ..MM. .MM+. ...MNMM.. .,M~. ..MMD...,MZ...MM. . .MM..
  9. .MI....~M8.. .?M,.MM......MM. .IMO. ...MM.,MD.. .,M~. ..MM...,MZ..,MM. . .MM.. .
  10. . .MI....NM=....MM..+M~.....MM. .MM.. ..M$ .MM.. .,M~. +M7..,MZ...MMM7.. ..MM. . ..
  11. . .MD8ONMM=. .ZM....MM.....MMMMMM.... .MM....MM. .,M~. .M8..,MZ.. .OMMM7. .MMMMMMM...
  12. .MMMMN.. .MN.. ?MN ...MM...MM=.. .IM+....NM, .,M~. ?M+..,MZ.. .. .MMM. .MM. .
  13. ...MI.. ..ZMMMMMMMMM....MM....MM....MMMMMMMMMM...,M~. ..MM...,MZ.........MM...MM........ .. ...... .. .. .....
  14. .MI.. . ,MN.. . .,MN...MM. .+MN..7M+. .NM$..,M:.....MM, ,MZ..D......MM .MM.......
  15. ...MI.. ..MM..... ..MM...MM. ..NM..MM.. ..MM..,MMMMMMM$. ,MZ..DMMMMMMO. .MMMMMMMM.
  16. .. .... ..... .. .. . . ..... ... . .. ..... ....... ... .
  17. . . . . . ..... ...... . ... . ... .. ... . .
  18. .. ...... . ... ... . . . . . .. . .. . . . .. . ..
  19. .. .... ............ ... . .. ... .... . . .. .. . .... . ... . .. .. . .... . ..
  20. . ....... . .........................................................................................................
  21. ................ .......... ..........................................................................................
  22. ............ ... ..... . .... .... .... . . .. ... . ..... . . .. .. ... .. .. .. .... . . .. .. ... .. .. .. ..
  23. ........................................................................................................................
  24. .......... ..................................................MMMMM7....................................................
  25. ................... ...... . ..............................:MN...NMI...................................................
  26. .......... ............... ............. ................OM:...IM$...................................................
  27. ............ ................................................MM..DMM....................................................
  28. ........ . ... .... ..... . ... ........ .... ............MMMD. ...... ....... .... ...... ...... ....... ....
  29. ............ . .............................................OMMMM8...ZM.................................................
  30. ....... .... .. ........ ............... ...............ZM...OMM..MM... ... ......... . ........... ... .........
  31. ....... . .. .. ..... ....... ... .... .....MM.....MMMM.... ....... ...... ..... ....... ....... ......
  32. ....... ... .. ........ . .............. ..............$MN....,MMM=.................................................
  33. ....... ... ... ..... . ............ ............. $MMMMMM$.+MMI. .. .. .. . ..... ...... .. .. .. .
  34. ........................................................................................................................
  35. .......... .. .......................................................... ............................. ...............
  36. .......... ............................................................................................................
  37. ....... .... ............. .............................................................................................
  38. ........................................................................................................................
  39. .............. .........................................................................................................
  40. . ........ .. ...... ... . . . . .... .. . . . .. . . .
  41. . . .. .. ... .. . .. . . . . ....... .. . . . . . . ... . . . . ..
  42. ...... ........... . .. . .. ....................M= .... . . .. . . . . .. . . .
  43. . .. .... ........ .MM... .:MM~... NM..:MN......... . . . . . .. . . . . . . . .. .
  44. . ........... . . .... . .NM... .MMMM.....MM.... ........ ... ...... ......... .. ..... . .. ........ . . .. . ...
  45. . . ... ...... . . .MN....MINM....~M....M8 .MN?MMMMD....$MMMMMMM~.MMMMMMM....MMMMMM?.. .M,NMMM .
  46. . ........... .. . .. ....MM...?M..M$...MM....M8.. MMM...MM?..~M7 .MM.......NM:. .MD.. =MD...MMD... .. .
  47. ... .. ...... ..=MZ..MN..MM..~M=....M8 MM. ...MM..8M. .ZM.. .$M,. MM... .MM...MD.
  48. . .. .. . MM.=M...~M7.MM .,M8 .MM.....MN...MM?.ZMD. ...NM... MM .MM...M8..
  49. . ....... ... .. .... ZM:MM....MM.MN.....M8.. MM. ..MN..MM.8M$.. ..NM~ MM.. .MM...M8... .
  50. . .... .... .. . .MMMO.. .8MNM. ..M8 MM. ..MN..DMMNNN.....MM.. .. .MM....MM~...M8.. ..
  51. ... ............................ZMM......MMO......M8...MM....,MM..+MN .MMM..MMMMMMM....MMMMMM. ...M8..... ............
  52. . . .. ..... .... ... . ....... ... . ... .... ... ......MN. ...DM.... .... ......... ........ .... ... ....
  53. . .. .. ...... .. . . . . . .. .... ..MMM:::MMD. . . . . .
  54. . ... . .. .. ..+++...
  55. ...... ..... .. . .. . . . . . . .. . . . ..
  56. . ... .. .. .. . ...... ... . .... .... .. . . . . . . .. . ... . . . . . .. . ..
  57. . .......... ... . . . . . . . .. . .... . . . . . .. . . . . .. .
  58. ... .. . .. ... .. . . ... ..... .... .. . . . . .
  59. . .................................... ........... ............... ............ ................ ............ ..........
  60. */
  61.  
  62. main()
  63. {
  64. maps\mp\_load::main();
  65.  
  66.  
  67. //setExpFog(500, 2200, 0, 0, 0, 0.5);
  68. //Print3d( (0,0,0), "START", (1.0, 0.8, 0.5), 1000, 1000, 100000 );
  69.  
  70.  
  71. precacheItem("m40a3_mp");
  72. precacheItem("remington700_mp");
  73. precacheItem("ak74u_mp");
  74. precacheItem("deserteaglegold_mp");
  75.  
  76.  
  77. game["allies"] = "marines";
  78. game["axis"] = "opfor";
  79. game["attackers"] = "axis";
  80. game["defenders"] = "allies";
  81. game["allies_soldiertype"] = "desert";
  82. game["axis_soldiertype"] = "desert";
  83.  
  84.  
  85. setdvar( "r_specularcolorscale", "1" );
  86. setdvar("r_glowbloomintensity0",".25");
  87. setdvar("r_glowbloomintensity1",".25");
  88. setdvar("r_glowskybleedintensity0",".3");
  89.  
  90.  
  91.  
  92. //threads
  93. thread twister1a();
  94. thread twister1b();
  95. thread short1();
  96. thread trap1();
  97. thread trap2();
  98. thread trap3();
  99. thread trap4();
  100. thread trap5();
  101. thread trap6();
  102. thread trap7();
  103. thread trap8();
  104. thread rotate7sense();
  105. thread rotateparadise();
  106. thread start();
  107. thread WatchEndTrigger();
  108. thread bounce();
  109. thread actistartup();
  110. thread pickgametype();
  111. thread fakebrushes();
  112. thread addtriggers();
  113. thread fixvariables();
  114. }
  115.  
  116. addtriggers()
  117. {
  118. addTriggerToList("trap1act");
  119. addTriggerToList("trap2act");
  120. addTriggerToList("trap3act");
  121. addTriggerToList("trap4act");
  122. addTriggerToList("trap5act");
  123. addTriggerToList("trap6act");
  124. addTriggerToList("trap7act");
  125. addTriggerToList("trap8act");
  126. }
  127.  
  128. addTriggerToList( name )
  129. {
  130. if( !isDefined( level.trapTriggers ) )
  131. level.trapTriggers = [];
  132. level.trapTriggers[level.trapTriggers.size] = getEnt( name, "targetname" );
  133. }
  134.  
  135. fakebrushes()
  136. {
  137. fakebrush = getentarray("fake", "targetname");
  138. for(i = 0; i < fakebrush.size; i++)
  139. {
  140. thread spin(fakebrush[i]);
  141. thread spots(fakebrush[i]);
  142. }
  143. }
  144.  
  145. spin(brush)
  146. {
  147. if (!isdefined(brush.speed))
  148. brush.speed = 3;
  149. if (!isdefined(brush.script_noteworthy))
  150. brush.script_noteworthy = "z";
  151.  
  152. while(true)
  153. {
  154. // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
  155. if (brush.script_noteworthy == "z")
  156. brush rotateYaw(360,brush.speed);
  157. else if (brush.script_noteworthy == "x")
  158. brush rotateRoll(360,brush.speed);
  159. else if (brush.script_noteworthy == "y")
  160. brush rotatePitch(360,brush.speed);
  161. wait ((brush.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
  162. //epic waittill("rotatedone");
  163. }
  164. }
  165.  
  166. spots(brush)
  167. {
  168. brush notsolid();
  169. while(1)
  170. {
  171. //randx = RandomIntRange(-777, 3831 );
  172. randx = RandomIntRange(-4777, 7831 );
  173. spot=(randx,19911,728);
  174. brush moveTo(spot,1);
  175. brush waittill("movedone");
  176. randwait = RandomIntRange(1, 10 );
  177. wait(randwait);
  178. brush show();
  179. randsolid = RandomIntRange(1, 10 );
  180. if(randsolid<3)
  181. brush solid();
  182. else
  183. brush notsolid();
  184. randmovetime = RandomIntRange(3, 12 );
  185. randx2 = RandomIntRange(256, 2816 );
  186. endspot=(randx2,7768,728);
  187. brush moveTo(endspot,randmovetime);
  188. brush waittill("movedone");
  189. brush notsolid();
  190. brush hide();
  191. }
  192.  
  193. }
  194.  
  195.  
  196. actistartup()
  197. {
  198. //pusher
  199. push_brush=getent("pusher","targetname");
  200. level waittill("round_started");
  201. wait(10);
  202. if(level.gamepicked==true)
  203. {
  204. push_brush movey(240,1);
  205. push_brush waittill("movedone");
  206. thread dropdown();
  207. }
  208. else
  209. {
  210. ambientPlay("default");
  211. level.angletrigger delete();
  212. level.twisttrigger delete();
  213. thread dropdown();
  214. push_brush movey(240,3);
  215. push_brush waittill("movedone");
  216. }
  217. level notify("actipickedgame");
  218. }
  219.  
  220. pickgametype()
  221. {
  222. level.gamepicked=false;
  223. thread anglemode();
  224. }
  225.  
  226. anglemode()
  227. {
  228. level.angletrigger = getEnt("angle", "targetname");
  229. level.angletrigger waittill("trigger", player);
  230.  
  231. thread angleturner();
  232. iprintlnbold("Angle Mode Activated");
  233. ambientPlay("angle");
  234. level.gamepicked=true;
  235.  
  236. }
  237.  
  238. angleturner()
  239. {
  240. spot=getent("jumpertele","targetname");
  241. trigger=getent("modetrig","targetname");
  242. while(1)
  243. {
  244. trigger waittill("trigger", player);
  245. if(!isdefined(player.angleset))
  246. {
  247. player SetPlayerAngles(spot.origin);
  248. player.angleset=true;
  249. }
  250. wait(0.05);
  251. }
  252. }
  253.  
  254. dropdown()
  255. {
  256. level.floor=getent("floor","targetname");
  257. level.floor delete();
  258. }
  259.  
  260. //traps
  261.  
  262. trap1()
  263. {
  264. trigger = getEnt("trap1act", "targetname");
  265. trigger waittill("trigger", player);
  266. trigger delete();
  267. thread trapa();
  268. thread trapb();
  269. }
  270.  
  271. fixvariables()
  272. {
  273. trigger=getent("modetrig2","targetname");
  274. while(1)
  275. {
  276. trigger waittill("trigger", player);
  277. if(isdefined(player.angleset))
  278. player.angleset=undefined;
  279. wait 0.05;
  280. }
  281. }
  282.  
  283.  
  284. trapa()
  285. {
  286. brush1 = getEnt("trap1a", "targetname");
  287. while(1)
  288. {
  289. brush1 movey(64,0.5);
  290. brush1 waittill("movedone");
  291. brush1 movey(-64,0.5);
  292. brush1 waittill("movedone");
  293. brush1 movey(-64,0.5);
  294. brush1 waittill("movedone");
  295. brush1 movey(64,0.5);
  296. brush1 waittill("movedone");
  297. }
  298. }
  299.  
  300. trapb()
  301. {
  302. brush1 = getEnt("trap1b", "targetname");
  303. while(1)
  304. {
  305. brush1 movex(64,0.5);
  306. brush1 waittill("movedone");
  307. brush1 movex(-64,0.5);
  308. brush1 waittill("movedone");
  309. brush1 movex(-64,0.5);
  310. brush1 waittill("movedone");
  311. brush1 movex(64,0.5);
  312. brush1 waittill("movedone");
  313. }
  314. }
  315.  
  316.  
  317. trap2()
  318. {
  319. trigger = getEnt("trap2act", "targetname");
  320. trigger waittill("trigger", player);
  321. trigger delete();
  322. thread trap2a();
  323. thread trap2b();
  324. }
  325.  
  326. trap2a()
  327. {
  328. epic = getEnt("trap2a", "targetname");
  329. if (!isdefined(epic.speed))
  330. epic.speed = 12;
  331. if (!isdefined(epic.script_noteworthy))
  332. epic.script_noteworthy = "z";
  333.  
  334. while(true)
  335. {
  336. // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
  337. if (epic.script_noteworthy == "z")
  338. epic rotateYaw(360,epic.speed);
  339. else if (epic.script_noteworthy == "x")
  340. epic rotateRoll(360,epic.speed);
  341. else if (epic.script_noteworthy == "y")
  342. epic rotatePitch(360,epic.speed);
  343. wait ((epic.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
  344. //epic waittill("rotatedone");
  345. }
  346. }
  347.  
  348.  
  349. trap2b()
  350. {
  351. epic = getEnt("trap2b", "targetname");
  352. if (!isdefined(epic.speed))
  353. epic.speed = 12;
  354. if (!isdefined(epic.script_noteworthy))
  355. epic.script_noteworthy = "z";
  356.  
  357. while(true)
  358. {
  359. // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
  360. if (epic.script_noteworthy == "z")
  361. epic rotateYaw(-360,epic.speed);
  362. else if (epic.script_noteworthy == "x")
  363. epic rotateRoll(-360,epic.speed);
  364. else if (epic.script_noteworthy == "y")
  365. epic rotatePitch(-360,epic.speed);
  366. wait ((epic.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
  367. //epic waittill("rotatedone");
  368. }
  369. }
  370.  
  371. trap3()
  372. {
  373. trigger = getEnt("trap3act", "targetname");
  374. trigger waittill("trigger", player);
  375. trigger delete();
  376. thread trap3a();
  377. thread trap3b();
  378. }
  379.  
  380. trap3a()
  381. {
  382. brush1 = getEnt("trap3a", "targetname");
  383. brush1 movey(-1344,4);
  384. brush1 waittill("movedone");
  385. }
  386.  
  387. trap3b()
  388. {
  389. wait 4;
  390. brush1 = getEnt("trap3b", "targetname");
  391. brush1 movey(-1088,3);
  392. brush1 waittill("movedone");
  393. }
  394.  
  395. short1()
  396. {
  397. trigger = getEnt("short1act", "targetname");
  398. brush1 = getEnt("short1plat", "targetname");
  399. trigger waittill("trigger");
  400. trigger delete();
  401. iprintlnbold("Target hit");
  402. brush1 movey(-576,3);
  403. brush1 waittill("movedone");
  404. }
  405.  
  406. trap4()
  407. {
  408. trigger = getEnt("trap4act", "targetname");
  409. trigger waittill("trigger", player);
  410. trigger delete();
  411. thread trap4a();
  412. thread trap4b();
  413. thread trap4c();
  414. thread trap4d();
  415. }
  416.  
  417. trap4a()
  418. {
  419. brush1 = getEnt("trap4a", "targetname");
  420. while(1)
  421. {
  422. brush1 movey(64,0.6);
  423. brush1 waittill("movedone");
  424. brush1 movey(-64,0.6);
  425. brush1 waittill("movedone");
  426. brush1 movez(-64,0.6);
  427. brush1 waittill("movedone");
  428. brush1 movez(64,0.6);
  429. brush1 waittill("movedone");
  430. }
  431. }
  432.  
  433. trap4b()
  434. {
  435. brush1 = getEnt("trap4b", "targetname");
  436. while(1)
  437. {
  438. brush1 movey(-64,0.6);
  439. brush1 waittill("movedone");
  440. brush1 movey(64,0.6);
  441. brush1 waittill("movedone");
  442. brush1 movex(64,0.6);
  443. brush1 waittill("movedone");
  444. brush1 movex(-64,0.6);
  445. brush1 waittill("movedone");
  446. }
  447. }
  448.  
  449. trap4c()
  450. {
  451. brush1 = getEnt("trap4c", "targetname");
  452. while(1)
  453. {
  454. brush1 movex(64,0.6);
  455. brush1 waittill("movedone");
  456. brush1 movex(-64,0.6);
  457. brush1 waittill("movedone");
  458. brush1 movey(-64,0.6);
  459. brush1 waittill("movedone");
  460. brush1 movey(64,0.6);
  461. brush1 waittill("movedone");
  462. }
  463. }
  464.  
  465. trap4d()
  466. {
  467. brush1 = getEnt("trap4d", "targetname");
  468. while(1)
  469. {
  470. brush1 movez(-32,0.6);
  471. brush1 waittill("movedone");
  472. brush1 movez(32,0.6);
  473. brush1 waittill("movedone");
  474. brush1 movex(-64,0.6);
  475. brush1 waittill("movedone");
  476. brush1 movex(64,0.6);
  477. brush1 waittill("movedone");
  478. }
  479. }
  480.  
  481. trap5()
  482. {
  483. trigger = getEnt("trap5act", "targetname");
  484. trigger waittill("trigger", player);
  485. trigger delete();
  486. thread trap5a();
  487. thread trap5b();
  488. thread trap5c();
  489. }
  490.  
  491. trap5a()
  492. {
  493. brush1 = getEnt("trap5a", "targetname");
  494. while(1)
  495. {
  496. brush1 movex(832,2.5);
  497. brush1 waittill("movedone");
  498. brush1 movex(-832,2.5);
  499. brush1 waittill("movedone");
  500. }
  501. }
  502.  
  503. trap5b()
  504. {
  505. brush1 = getEnt("trap5b", "targetname");
  506. while(1)
  507. {
  508. brush1 movex(-832,2.5);
  509. brush1 waittill("movedone");
  510. brush1 movex(832,2.5);
  511. brush1 waittill("movedone");
  512. }
  513. }
  514.  
  515. trap5c()
  516. {
  517. brush1 = getEnt("trap5c", "targetname");
  518. wait 0.5;
  519. brush1 movez(-488,2.5);
  520. brush1 waittill("movedone");
  521. }
  522.  
  523. trap6()
  524. {
  525. trigger = getEnt("trap6act", "targetname");
  526. trigger waittill("trigger", player);
  527. trigger delete();
  528. thread trap6a();
  529. }
  530.  
  531. trap6a()
  532. {
  533. brush1 = getEnt("trap6a", "targetname");
  534. while(1)
  535. {
  536. brush1 movey(-96,0.5);
  537. brush1 waittill("movedone");
  538. brush1 movez(64,0.5);
  539. brush1 waittill("movedone");
  540. brush1 movey(-4032,4);
  541. brush1 waittill("movedone");
  542. brush1 hide();
  543. brush1 notsolid();
  544. brush1 movey(96,0.5);
  545. brush1 waittill("movedone");
  546. brush1 movez(-64,0.5);
  547. brush1 waittill("movedone");
  548. brush1 movey(4032,0.5);
  549. brush1 waittill("movedone");
  550. brush1 show();
  551. brush1 solid();
  552. wait(1);
  553. }
  554. }
  555.  
  556. twister1a()
  557. {
  558. epic = getEnt("twister1a", "targetname");
  559. if (!isdefined(epic.speed))
  560. epic.speed = 8;
  561. if (!isdefined(epic.script_noteworthy))
  562. epic.script_noteworthy = "z";
  563.  
  564. while(true)
  565. {
  566. // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
  567. if (epic.script_noteworthy == "z")
  568. epic rotateYaw(360,epic.speed);
  569. else if (epic.script_noteworthy == "x")
  570. epic rotateRoll(360,epic.speed);
  571. else if (epic.script_noteworthy == "y")
  572. epic rotatePitch(360,epic.speed);
  573. wait ((epic.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
  574. //epic waittill("rotatedone");
  575. }
  576. }
  577.  
  578. twister1b()
  579. {
  580. epic = getEnt("twister1b", "targetname");
  581. if (!isdefined(epic.speed))
  582. epic.speed = 8;
  583. if (!isdefined(epic.script_noteworthy))
  584. epic.script_noteworthy = "z";
  585.  
  586. while(true)
  587. {
  588. // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
  589. if (epic.script_noteworthy == "z")
  590. epic rotateYaw(-360,epic.speed);
  591. else if (epic.script_noteworthy == "x")
  592. epic rotateRoll(-360,epic.speed);
  593. else if (epic.script_noteworthy == "y")
  594. epic rotatePitch(-360,epic.speed);
  595. wait ((epic.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
  596. //epic waittill("rotatedone");
  597. }
  598. }
  599.  
  600. trap7()
  601. {
  602. trigger = getEnt("trap7act", "targetname");
  603. trigger waittill("trigger", player);
  604. trigger delete();
  605. thread trap7a();
  606. }
  607.  
  608. trap7a()
  609. {
  610. epic = getEnt("trap7a", "targetname");
  611. if (!isdefined(epic.speed))
  612. epic.speed = 15;
  613. if (!isdefined(epic.script_noteworthy))
  614. epic.script_noteworthy = "x";
  615.  
  616. while(true)
  617. {
  618. // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
  619. if (epic.script_noteworthy == "z")
  620. epic rotateYaw(-360,epic.speed);
  621. else if (epic.script_noteworthy == "x")
  622. epic rotateRoll(-360,epic.speed);
  623. else if (epic.script_noteworthy == "y")
  624. epic rotatePitch(-360,epic.speed);
  625. wait ((epic.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
  626. //epic waittill("rotatedone");
  627. }
  628. }
  629.  
  630. trap8()
  631. {
  632. trigger = getEnt("trap8act", "targetname");
  633. trigger waittill("trigger", player);
  634. trigger delete();
  635. thread trap8a();
  636. }
  637.  
  638. trap8a()
  639. {
  640. epic = getEnt("trap8a", "targetname");
  641. if (!isdefined(epic.speed))
  642. epic.speed = 2;
  643. if (!isdefined(epic.script_noteworthy))
  644. epic.script_noteworthy = "y";
  645.  
  646. while(true)
  647. {
  648. // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
  649. if (epic.script_noteworthy == "z")
  650. epic rotateYaw(-360,epic.speed);
  651. else if (epic.script_noteworthy == "x")
  652. epic rotateRoll(-360,epic.speed);
  653. else if (epic.script_noteworthy == "y")
  654. epic rotatePitch(-360,epic.speed);
  655. wait ((epic.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
  656. //epic waittill("rotatedone");
  657. wait 2;
  658. // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
  659. if (epic.script_noteworthy == "z")
  660. epic rotateYaw(360,epic.speed);
  661. else if (epic.script_noteworthy == "x")
  662. epic rotateRoll(360,epic.speed);
  663. else if (epic.script_noteworthy == "y")
  664. epic rotatePitch(360,epic.speed);
  665. wait ((epic.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
  666. //epic waittill("rotatedone");
  667. wait 5;
  668. }
  669. }
  670.  
  671. rotate7sense()
  672. {
  673. epic = getEnt("7sense", "targetname");
  674. if (!isdefined(epic.speed))
  675. epic.speed = 5;
  676. if (!isdefined(epic.script_noteworthy))
  677. epic.script_noteworthy = "z";
  678.  
  679. while(true)
  680. {
  681. // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
  682. if (epic.script_noteworthy == "z")
  683. epic rotateYaw(-360,epic.speed);
  684. else if (epic.script_noteworthy == "x")
  685. epic rotateRoll(-360,epic.speed);
  686. else if (epic.script_noteworthy == "y")
  687. epic rotatePitch(-360,epic.speed);
  688. wait ((epic.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
  689. //epic waittill("rotatedone");
  690. }
  691. }
  692.  
  693. rotateparadise()
  694. {
  695. epic = getEnt("paradise", "targetname");
  696. if (!isdefined(epic.speed))
  697. epic.speed = 5;
  698. if (!isdefined(epic.script_noteworthy))
  699. epic.script_noteworthy = "z";
  700.  
  701. while(true)
  702. {
  703. epic rotateYaw(720,epic.speed);
  704. epic waittill("rotatedone");
  705. epic rotateRoll(720,2);
  706. epic waittill("rotatedone");
  707. epic rotateYaw(-720,epic.speed);
  708. epic waittill("rotatedone");
  709. epic rotateRoll(720,2);
  710. epic waittill("rotatedone");
  711. }
  712. }
  713.  
  714. start()
  715. {
  716. brush1 = getEnt("startdoor", "targetname");
  717. level waittill("actipickedgame");
  718. brush1 movez(-832,2.5);
  719. brush1 waittill("movedone");
  720. brush1 delete();
  721. }
  722.  
  723.  
  724. WatchEndTrigger()
  725. {
  726. triggertele = getEnt("roomtrigger", "targetname");
  727. level.acti_enemy = undefined;
  728. level.turn = 1;
  729. level.jumper_turn = [];
  730. while(1)
  731. {
  732. triggertele waittill("trigger", player );
  733. if( getTeamPlayersAlive("axis") < 1 )
  734. {
  735. player iprintlnbold("^1You can't fight alone.");
  736. return;
  737. }
  738.  
  739. if( isDefined( level.acti_enemy ) && level.acti_enemy != player )
  740. {
  741. self.control = 0;
  742. for(clturn=1;clturn<level.turn;clturn++)
  743. {
  744. if( level.jumper_turn[clturn] == player )
  745. { self.control = 1;
  746. }
  747. }
  748.  
  749. if( self.control != 1)
  750. {
  751. level.turn = level.turn + 1;
  752. player iprintlnbold("^3Finished " + level.turn );
  753. level.jumper_turn[level.turn] = player;
  754. wait 3;
  755. }
  756. else
  757. {
  758. player iprintlnbold("Wait your turn.");
  759. wait 3;
  760. }
  761.  
  762.  
  763. }
  764. if( !isDefined(level.acti_enemy))
  765. {
  766. level.jumper_turn[level.turn] = player;
  767. level.acti_enemy = level.jumper_turn[1];
  768. iprintlnbold( player.name + " finished first!");
  769. randsong = RandomIntRange(1, 100 );
  770. if(randsong<50)
  771. ambientPlay("impossible");
  772. else
  773. ambientPlay("twist");
  774. player iprintlnbold("^11 VS 1 Fight!");
  775. thread StartFinalFight();
  776. thread controljumper();
  777. }
  778. }
  779. }
  780. controljumper()
  781. {
  782.  
  783. while(1)
  784. {
  785.  
  786. if(isAlive(level.acti_enemy))
  787. {
  788. for(turn=1;turn<level.turn;turn++)
  789. {
  790. iprintln( turn + "^2 >" + level.jumper_turn[turn]);
  791. wait 2;
  792. }
  793.  
  794. }
  795. else
  796. {
  797. for(turn=1;turn<level.turn;turn++)
  798. {
  799. if( isAlive(level.jumper_turn[turn]))
  800. {
  801. level.acti_enemy = level.jumper_turn[turn];
  802. thread StartFinalFight();
  803. }
  804. }
  805. }
  806. wait 3;
  807. }
  808. }
  809.  
  810. StartFinalFight()
  811. {
  812.  
  813.  
  814. acti = undefined;
  815. jumper = level.acti_enemy;
  816.  
  817. players = getentarray("player", "classname");
  818. for(i=0;i<players.size;i++)
  819. {
  820. if( players[i].pers["team"] == "axis" && isAlive(players[i]) )
  821. {
  822. acti = players[i];
  823. break;
  824. }
  825. }
  826.  
  827.  
  828.  
  829.  
  830. spawnorigin = getEnt("jumpertele", "targetname");
  831. level.actspawnorigin = getEnt("actitele", "targetname");
  832.  
  833. acti SetPlayerAngles( level.actspawnorigin.angles );
  834. acti SetOrigin( level.actspawnorigin.origin );
  835. jumper SetPlayerAngles( spawnorigin.angles );
  836. jumper SetOrigin( spawnorigin.origin );
  837.  
  838. acti takeallweapons();
  839. acti GiveWeapon("m40a3_mp");
  840. acti GiveWeapon("remington700_mp");
  841. acti SwitchToWeapon( "m40a3_mp" );
  842. acti GiveMaxAmmo( self.pers["m40a3_mp"] );
  843. acti GiveMaxAmmo( self.pers["remington700_mp"] );
  844.  
  845. jumper takeallweapons();
  846. jumper GiveWeapon("m40a3_mp");
  847. jumper GiveWeapon("remington700_mp");
  848. jumper SwitchToWeapon( "m40a3_mp" );
  849. jumper GiveMaxAmmo( self.pers["m40a3_mp"] );
  850. jumper GiveMaxAmmo( self.pers["remington700_mp"] );
  851.  
  852.  
  853. acti FreezeControls(1);
  854. jumper FreezeControls(1);
  855.  
  856.  
  857. wait 2;
  858.  
  859. noti = SpawnStruct();
  860. noti.titleText = "=|FINAL FIGHT|=";
  861. noti.notifyText = "1 VS 1 ";
  862. noti.duration = 5;
  863. noti.glowcolor = (1,0,0);
  864. players = getentarray("player", "classname");
  865. for(i=0;i<players.size;i++)
  866. players[i] thread maps\mp\gametypes\_hud_message::notifyMessage( noti );
  867.  
  868. wait 2;
  869.  
  870. noti = SpawnStruct();
  871. noti.titleText = acti.name + " ^3VS ^7" + jumper.name;
  872. noti.notifyText = "GET READY!";
  873. noti.duration = 5;
  874. noti.glowcolor = (1,0,0);
  875. players = getentarray("player", "classname");
  876. for(i=0;i<players.size;i++)
  877. players[i] thread maps\mp\gametypes\_hud_message::notifyMessage( noti );
  878.  
  879. wait 2;
  880.  
  881. VisionSetNaked( "finalfight_mp", 2 );
  882. jumper FreezeControls(0);
  883. acti FreezeControls(0);
  884.  
  885. iprintlnbold("^3F I G H T !");
  886. }
  887.  
  888.  
  889.  
  890. bounce()
  891. {
  892. trigger=getent("bounceskiptrig","targetname");
  893. brush=getent("bounceskip","targetname");
  894. brush hide();
  895. brush notsolid();
  896. trigger waittill("trigger", other);
  897. brush show();
  898. brush solid();
  899. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement