home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2005 July / Game.EXE_07_2005_DVD.iso / Flash / Strande / strande.swf / scripts / frame_2 / DoAction.as
Encoding:
Text File  |  2004-12-13  |  3.8 KB  |  160 lines

  1. function BulletSpawn(x, y, rot)
  2. {
  3.    duplicateMovieClip(_root.Line,"Bullet",16386);
  4.    b = Math.random() * 10 - 5;
  5.    _root.Bullet._x = x;
  6.    _root.Bullet._y = y;
  7.    _root.Bullet._rotation = rot + b;
  8.    _root.Bullet._xscale = Facing * 50;
  9.    _root.Bullet.type = 1;
  10. }
  11. function EBullSpawn(x2, y2, rot2, facing2)
  12. {
  13.    duplicateMovieClip(_root.Line,"EBullet",16389);
  14.    b2 = Math.random() * 10 - 5;
  15.    _root.EBullet._x = x2;
  16.    _root.EBullet._y = y2;
  17.    _root.EBullet._rotation = rot2 + b2;
  18.    _root.EBullet._xscale = facing2 * 50;
  19.    _root.Ebullet.type = 2;
  20. }
  21. function GrenadeSpawn()
  22. {
  23.    _global.Grenading = true;
  24.    duplicateMovieClip(_root.agrenade,"Grenade",16390);
  25.    _root.Grenade._visible = true;
  26.    _root.Grenade._x = _root.Char._x;
  27.    _root.Grenade._y = _root.Char._y;
  28.    _root.Grenade._xscale = Facing * 40;
  29. }
  30. function BoomSpawn(x, y)
  31. {
  32.    duplicateMovieClip(_root.Boom,"Bang",16391);
  33.    _root.Bang._x = x;
  34.    _root.Bang._y = y;
  35. }
  36. function ImpactSpawn()
  37. {
  38.    if(prob(2))
  39.    {
  40.       duplicateMovieClip(_root.Lines,"Impact",16385);
  41.    }
  42.    else
  43.    {
  44.       duplicateMovieClip(_root.Lines2,"Impact",16385);
  45.    }
  46.    _root.Impact._x = _root.Bullet._x;
  47.    _root.Impact._y = _root.Bullet._y;
  48.    _root.Impact._rotation = _root.Bullet._rotation;
  49.    _root.Impact._xscale = _root.Bullet._xscale;
  50. }
  51. function BloodSpawn()
  52. {
  53.    duplicateMovieClip(_root.Liness,"Blood",16404);
  54.    _root.Blood._x = _root.Bullet._x;
  55.    _root.Blood._y = _root.Bullet._y;
  56.    _root.Blood._rotation = _root.Bullet._rotation;
  57.    _root.Blood._xscale = _root.Bullet._xscale;
  58. }
  59. function eBloodSpawn()
  60. {
  61.    duplicateMovieClip(_root.Liness,"Blood",16388);
  62.    _root.Blood._x = _root.EBullet._x;
  63.    _root.Blood._y = _root.EBullet._y;
  64.    _root.Blood._rotation = _root.EBullet._rotation;
  65.    _root.Blood._xscale = _root.EBullet._xscale;
  66. }
  67. function SpawnBaddies(x)
  68. {
  69.    _global.Baddies = _global.Baddies + 1;
  70.    i = 1;
  71.    n = 1;
  72.    while(n == 1 && i <= Difficult)
  73.    {
  74.       i++;
  75.       n = BaddieSlots[i - 1];
  76.    }
  77.    _global.BaddieSlots[i - 1] = 1;
  78.    if(x == 1)
  79.    {
  80.       duplicateMovieClip(_root.Soldier,["Enemy" + i],16384 + (i + 7));
  81.    }
  82.    if(x == 2)
  83.    {
  84.       duplicateMovieClip(_root.Repeller,["Enemy" + i],16384 + (i + 7));
  85.    }
  86.    _root["Enemy" + i]._x = _root.tehground._x + 300 + random(100) * 17;
  87.    _root["Enemy" + i]._y = 72;
  88.    _root["Enemy" + i].number = i;
  89. }
  90. function SpawnTehMinez(x, y)
  91. {
  92.    duplicateMovieClip(_root.TehSpiderzMyuhn,"TehMine",16432);
  93.    _root.TehMine._x = x;
  94.    _root.TehMine._y = y;
  95. }
  96. function Prob(x)
  97. {
  98.    if(random(x) == 1)
  99.    {
  100.       return true;
  101.    }
  102. }
  103. Stande_local_data = SharedObject.getLocal("user_data");
  104. if(Stande_local_data.data.HighScore == undefined)
  105. {
  106.    _global.HighScore = 0;
  107.    Stande_local_data.data.HighScore = 0;
  108. }
  109. else
  110. {
  111.    _global.HighScore = Stande_local_data.data.HighScore;
  112. }
  113. if(Stande_local_data.data.Quality == undefined)
  114. {
  115.    _quality = "LOW";
  116.    Stande_local_data.data.Quality = "LOW";
  117. }
  118. else
  119. {
  120.    _quality = Stande_local_data.data.Quality;
  121. }
  122. if(Stande_local_data.data.SeeBack == undefined)
  123. {
  124.    _global.SeeBack = true;
  125.    Stande_local_data.data.SeeBack = true;
  126. }
  127. else
  128. {
  129.    _global.SeeBack = Stande_local_data.data.SeeBack;
  130. }
  131. if(Stande_local_data.data.PlayMusic == undefined)
  132. {
  133.    _global.PlayMusic = true;
  134.    Stande_local_data.data.PlayMusic = true;
  135. }
  136. else
  137. {
  138.    _global.PlayMusic = Stande_local_data.data.PlayMusic;
  139. }
  140. if(Stande_local_data.data.KeyBind == undefined)
  141. {
  142.    _global.KeyBind = 1;
  143.    Stande_local_data.data.KeyBind = 1;
  144. }
  145. else
  146. {
  147.    _global.KeyBind = Stande_local_data.data.KeyBind;
  148. }
  149. if(Stande_local_data.data.Difficult == undefined)
  150. {
  151.    _global.Difficult = 3;
  152.    Stande_local_data.data.Difficult = 3;
  153. }
  154. else
  155. {
  156.    _global.Difficult = Stande_local_data.data.Difficult;
  157. }
  158. Stande_local_data.flush();
  159. stop();
  160.