Advertisement
coolbunny1234

Untitled

Feb 18th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. Fountain_Mg42_Activate()
  2. {
  3. if( IsSubStr( level.script, "nazi_zombie_asylum" ) ) {
  4. self thread Fountain_Mg42_Activate1(30);
  5. } else {
  6. self iPrintln("Verruckt Only!");
  7. }
  8. }
  9.  
  10. Fountain_Mg42_Activate1(time)
  11. {
  12. self iPrintln("Turrect Activated For " +time+ " Seconds!");
  13. trig = getent("trig_courtyard_mg","targetname");
  14. trig sethintstring(&"ZOMBIE_USE_AUTO_TURRET");
  15.  
  16. mgs = getentarray( "fountain_mg", "targetname" );
  17. fake_mgs = getentarray("fake_mg","script_noteworthy");
  18.  
  19. //hide the real mg's
  20. for(i=0;i<mgs.size;i++)
  21. {
  22. mgs[i] hide();
  23. }
  24. trig.is_activated = true;
  25. trig trigger_off();
  26. trig sethintstring(&"ZOMBIE_FLAMES_UNAVAILABLE");
  27. //the fountain top sinks down
  28. fountain_top = getent("fountain_top","targetname");
  29. fountain_top moveto(fountain_top.origin + (0,0,-200),3);
  30. fountain_top waittill("movedone");
  31. trig trigger_on();
  32. fountain_mg = getentarray( "fountain_turret", "targetname" );
  33. for(i=0;i<fountain_mg.size;i++)
  34. {
  35. fountain_mg[i] moveto(fountain_mg[i].origin + (0,0,200),3);
  36. }
  37. fountain_mg[0] waittill("movedone");
  38. //hide the fake MG's once they're in place
  39. for(i=0;i<fake_mgs.size;i++)
  40. {
  41. fake_mgs[i] hide();
  42. }
  43. array_thread(fake_mgs,::trigger_off);
  44. //show the real MG's
  45. for(i=0;i<mgs.size;i++)
  46. {
  47. mgs[i] show();
  48. }
  49. for(i=0;i<mgs.size;i++)
  50. {
  51. mg = mgs[i];
  52. mg setTurretTeam( "allies" );
  53. mg SetMode( "auto_nonai" );
  54. mg thread maps\_mgturret::burst_fire_unmanned();
  55. }
  56. wait(time);
  57. self iPrintln("Turret ^2Over");
  58. for(i=0;i<mgs.size;i++)
  59. {
  60. mg = mgs[i];
  61. mg notify("stop_burst_fire_unmanned");
  62. mg SetMode( "manual" );
  63. }
  64. array_thread(fake_mgs,::trigger_on);
  65. for(i=0;i<fake_mgs.size;i++)
  66. {
  67. fake_mgs[i] show();
  68. }
  69. for(i=0;i<mgs.size;i++)
  70. {
  71. mgs[i] hide();
  72. }
  73. for(i=0;i<fountain_mg.size;i++)
  74. {
  75. fountain_mg[i] moveto(fountain_mg[i].origin + (0,0,-200),3);
  76. }
  77. fountain_mg[0] waittill("movedone");
  78. fountain_top moveto(fountain_top.origin + (0,0,200),3);
  79. fountain_top waittill("movedone");
  80. wait(15);
  81. trig.is_activated = undefined;
  82. trig sethintstring(&"ZOMBIE_USE_AUTO_TURRET");
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement