home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / MetaPloy.swf / scripts / DefineSprite_83 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  9.2 KB  |  156 lines

  1. set("/:ms1_x1",int(getProperty("/1", _X) - eval("/:ms1_hw") / "2"));
  2. set("/:ms1_x2",int(getProperty("/1", _X) + eval("/:ms1_hw") / "2"));
  3. set("/:ms1_y1",int(getProperty("/1", _Y) - eval("/:ms1_hh") / "2"));
  4. set("/:ms1_y2",int(getProperty("/1", _Y) + eval("/:ms1_hh") / "2"));
  5. set("/:ene1_x1",int(getProperty("/wr1", _X) - eval("/:ene_hw")));
  6. set("/:ene1_x2",int(getProperty("/wr1", _X) + eval("/:ene_hw")));
  7. set("/:ene1_y1",int(getProperty("/wr1", _Y) - eval("/:ene_hh")));
  8. set("/:ene1_y2",int(getProperty("/wr1", _Y) + eval("/:ene_hh")));
  9. if(eval("/:ms1_x2") >= eval("/:ene1_x1") and eval("/:ene1_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene1_y1") and eval("/:ene1_y2") >= eval("/:ms1_y1") and eval("/:pilz1") == "0")
  10. {
  11.    set("/:enehit","1");
  12. }
  13. set("/:ene2_x1",int(getProperty("/wr2", _X) - eval("/:ene_hw")));
  14. set("/:ene2_x2",int(getProperty("/wr2", _X) + eval("/:ene_hw")));
  15. set("/:ene2_y1",int(getProperty("/wr2", _Y) - eval("/:ene_hh")));
  16. set("/:ene2_y2",int(getProperty("/wr2", _Y) + eval("/:ene_hh")));
  17. if(eval("/:ms1_x2") >= eval("/:ene2_x1") and eval("/:ene2_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene2_y1") and eval("/:ene2_y2") >= eval("/:ms1_y1") and eval("/:pilz2") == "0")
  18. {
  19.    set("/:enehit","2");
  20. }
  21. set("/:ene3_x1",int(getProperty("/wr3", _X) - eval("/:ene_hw")));
  22. set("/:ene3_x2",int(getProperty("/wr3", _X) + eval("/:ene_hw")));
  23. set("/:ene3_y1",int(getProperty("/wr3", _Y) - eval("/:ene_hh")));
  24. set("/:ene3_y2",int(getProperty("/wr3", _Y) + eval("/:ene_hh")));
  25. if(eval("/:ms1_x2") >= eval("/:ene3_x1") and eval("/:ene3_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene3_y1") and eval("/:ene3_y2") >= eval("/:ms1_y1") and eval("/:pilz3") == "0")
  26. {
  27.    set("/:enehit","3");
  28. }
  29. set("/:ene4_x1",int(getProperty("/wr4", _X) - eval("/:ene_hw")));
  30. set("/:ene4_x2",int(getProperty("/wr4", _X) + eval("/:ene_hw")));
  31. set("/:ene4_y1",int(getProperty("/wr4", _Y) - eval("/:ene_hh")));
  32. set("/:ene4_y2",int(getProperty("/wr4", _Y) + eval("/:ene_hh")));
  33. if(eval("/:ms1_x2") >= eval("/:ene4_x1") and eval("/:ene4_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene4_y1") and eval("/:ene4_y2") >= eval("/:ms1_y1") and eval("/:pilz4") == "0")
  34. {
  35.    set("/:enehit","4");
  36. }
  37. set("/:ene5_x1",int(getProperty("/wr5", _X) - eval("/:ene_hw")));
  38. set("/:ene5_x2",int(getProperty("/wr5", _X) + eval("/:ene_hw")));
  39. set("/:ene5_y1",int(getProperty("/wr5", _Y) - eval("/:ene_hh")));
  40. set("/:ene5_y2",int(getProperty("/wr5", _Y) + eval("/:ene_hh")));
  41. if(eval("/:ms1_x2") >= eval("/:ene5_x1") and eval("/:ene5_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene5_y1") and eval("/:ene5_y2") >= eval("/:ms1_y1") and eval("/:pilz5") == "0")
  42. {
  43.    set("/:enehit","5");
  44. }
  45. set("/:ene6_x1",int(getProperty("/wr6", _X) - eval("/:ene_hw")));
  46. set("/:ene6_x2",int(getProperty("/wr6", _X) + eval("/:ene_hw")));
  47. set("/:ene6_y1",int(getProperty("/wr6", _Y) - eval("/:ene_hh")));
  48. set("/:ene6_y2",int(getProperty("/wr6", _Y) + eval("/:ene_hh")));
  49. if(eval("/:ms1_x2") >= eval("/:ene6_x1") and eval("/:ene6_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene6_y1") and eval("/:ene6_y2") >= eval("/:ms1_y1") and eval("/:pilz6") == "0")
  50. {
  51.    set("/:enehit","6");
  52. }
  53. set("/:ene7_x1",int(getProperty("/wr7", _X) - eval("/:ene_hw")));
  54. set("/:ene7_x2",int(getProperty("/wr7", _X) + eval("/:ene_hw")));
  55. set("/:ene7_y1",int(getProperty("/wr7", _Y) - eval("/:ene_hh")));
  56. set("/:ene7_y2",int(getProperty("/wr7", _Y) + eval("/:ene_hh")));
  57. if(eval("/:ms1_x2") >= eval("/:ene7_x1") and eval("/:ene7_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene7_y1") and eval("/:ene7_y2") >= eval("/:ms1_y1") and eval("/:pilz7") == "0")
  58. {
  59.    set("/:enehit","7");
  60. }
  61. set("/:ene8_x1",int(getProperty("/wr8", _X) - eval("/:ene_hw")));
  62. set("/:ene8_x2",int(getProperty("/wr8", _X) + eval("/:ene_hw")));
  63. set("/:ene8_y1",int(getProperty("/wr8", _Y) - eval("/:ene_hh")));
  64. set("/:ene8_y2",int(getProperty("/wr8", _Y) + eval("/:ene_hh")));
  65. if(eval("/:ms1_x2") >= eval("/:ene8_x1") and eval("/:ene8_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene8_y1") and eval("/:ene8_y2") >= eval("/:ms1_y1") and eval("/:pilz8") == "0")
  66. {
  67.    set("/:enehit","8");
  68. }
  69. set("/:ene9_x1",int(getProperty("/wr9", _X) - eval("/:ene_hw")));
  70. set("/:ene9_x2",int(getProperty("/wr9", _X) + eval("/:ene_hw")));
  71. set("/:ene9_y1",int(getProperty("/wr9", _Y) - eval("/:ene_hh")));
  72. set("/:ene9_y2",int(getProperty("/wr9", _Y) + eval("/:ene_hh")));
  73. if(eval("/:ms1_x2") >= eval("/:ene9_x1") and eval("/:ene9_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene9_y1") and eval("/:ene9_y2") >= eval("/:ms1_y1") and eval("/:pilz9") == "0")
  74. {
  75.    set("/:enehit","9");
  76. }
  77. set("/:ene10_x1",int(getProperty("/wr10", _X) - eval("/:ene_hw")));
  78. set("/:ene10_x2",int(getProperty("/wr10", _X) + eval("/:ene_hw")));
  79. set("/:ene10_y1",int(getProperty("/wr10", _Y) - eval("/:ene_hh")));
  80. set("/:ene10_y2",int(getProperty("/wr10", _Y) + eval("/:ene_hh")));
  81. if(eval("/:ms1_x2") >= eval("/:ene10_x1") and eval("/:ene10_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene10_y1") and eval("/:ene10_y2") >= eval("/:ms1_y1") and eval("/:pilz10") == "0")
  82. {
  83.    set("/:enehit","10");
  84. }
  85. set("/:ene11_x1",int(getProperty("/wr11", _X) - eval("/:ene_hw")));
  86. set("/:ene11_x2",int(getProperty("/wr11", _X) + eval("/:ene_hw")));
  87. set("/:ene11_y1",int(getProperty("/wr11", _Y) - eval("/:ene_hh")));
  88. set("/:ene11_y2",int(getProperty("/wr11", _Y) + eval("/:ene_hh")));
  89. if(eval("/:ms1_x2") >= eval("/:ene11_x1") and eval("/:ene11_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene11_y1") and eval("/:ene11_y2") >= eval("/:ms1_y1") and eval("/:pilz11") == "0")
  90. {
  91.    set("/:enehit","11");
  92. }
  93. set("/:ene0_x1",int(getProperty("/wr0", _X) - eval("/:ene_hw")));
  94. set("/:ene0_x2",int(getProperty("/wr0", _X) + eval("/:ene_hw")));
  95. set("/:ene0_y1",int(getProperty("/wr0", _Y) - eval("/:ene_hh")));
  96. set("/:ene0_y2",int(getProperty("/wr0", _Y) + eval("/:ene_hh")));
  97. if(eval("/:ms1_x2") >= eval("/:ene0_x1") and eval("/:ene0_x2") >= eval("/:ms1_x1") and eval("/:ms1_y2") >= eval("/:ene0_y1") and eval("/:ene0_y2") >= eval("/:ms1_y1") and eval("/:pilz0") == "0")
  98. {
  99.    set("/:enehit","12");
  100. }
  101. if("1" < eval("/:shot1y"))
  102. {
  103.    set("/:sht1_x1",eval("/:shot1x") - "1");
  104.    set("/:sht1_x2",eval("/:shot1x") + "1");
  105.    set("/:sht1_y1",eval("/:shot1y") - "1");
  106.    set("/:sht1_y2",eval("/:shot1y") + "1");
  107.    if(eval("/:ene0_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene0_x1") and eval("/:ene0_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene0_y1") and "25" < eval("/:ene0_y2"))
  108.    {
  109.       set("/:hit0","1");
  110.    }
  111.    if(eval("/:ene1_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene1_x1") and eval("/:ene1_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene1_y1") and "25" < eval("/:ene1_y2"))
  112.    {
  113.       set("/:hit1","1");
  114.    }
  115.    if(eval("/:ene11_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene11_x1") and eval("/:ene11_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene11_y1") and "25" < eval("/:ene11_y2"))
  116.    {
  117.       set("/:hit11","1");
  118.    }
  119.    if(eval("/:ene10_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene10_x1") and eval("/:ene10_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene10_y1") and "25" < eval("/:ene10_y2"))
  120.    {
  121.       set("/:hit10","1");
  122.    }
  123.    if(eval("/:ene2_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene2_x1") and eval("/:ene2_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene2_y1") and "25" < eval("/:ene2_y2"))
  124.    {
  125.       set("/:hit2","1");
  126.    }
  127.    if(eval("/:ene3_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene3_x1") and eval("/:ene3_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene3_y1") and "25" < eval("/:ene3_y2"))
  128.    {
  129.       set("/:hit3","1");
  130.    }
  131.    if(eval("/:ene4_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene4_x1") and eval("/:ene4_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene4_y1") and "25" < eval("/:ene4_y2"))
  132.    {
  133.       set("/:hit4","1");
  134.    }
  135.    if(eval("/:ene5_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene5_x1") and eval("/:ene5_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene5_y1") and "25" < eval("/:ene5_y2"))
  136.    {
  137.       set("/:hit5","1");
  138.    }
  139.    if(eval("/:ene6_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene6_x1") and eval("/:ene6_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene6_y1") and "25" < eval("/:ene6_y2"))
  140.    {
  141.       set("/:hit6","1");
  142.    }
  143.    if(eval("/:ene7_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene7_x1") and eval("/:ene7_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene7_y1") and "25" < eval("/:ene6_y2"))
  144.    {
  145.       set("/:hit7","1");
  146.    }
  147.    if(eval("/:ene8_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene8_x1") and eval("/:ene8_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene8_y1") and "25" < eval("/:ene8_y2"))
  148.    {
  149.       set("/:hit8","1");
  150.    }
  151.    if(eval("/:ene9_x2") >= eval("/:sht1_x1") and eval("/:sht1_x2") >= eval("/:ene9_x1") and eval("/:ene9_y2") >= eval("/:sht1_y1") and eval("/:sht1_y2") >= eval("/:ene9_y1") and "25" < eval("/:ene9_y2"))
  152.    {
  153.       set("/:hit9","1");
  154.    }
  155. }
  156.