home *** CD-ROM | disk | FTP | other *** search
- lXPos = getProperty("/laser", _X);
- lYPos = getProperty("/laser", _Y);
- eCount = "0";
- while(eCount < eval("/:numberEnemies"))
- {
- if(eval("/enemyGrid/enemy" add eCount add ":alive") == "1")
- {
- eXPos = getProperty("/enemyGrid/enemy" add eCount, _X) + enemyGridXPos;
- eYPos = getProperty("/enemyGrid/enemy" add eCount, _Y) + enemyGridYPos;
- if(- "20" < lXPos - eXPos and lXPos - eXPos < "20" and - "20" < lYPos - eYPos and lYPos - eYPos < "20")
- {
- tellTarget("/enemyGrid/enemy" add eCount)
- {
- gotoAndStop("die");
- play();
- }
- call("HitEnemy");
- }
- }
- eCount += "1";
- }
- if(eval("/:ufoActive") == "1")
- {
- ufoXPos = getProperty("/ufo", _X);
- if(- "20" < lXPos - ufoXPos and lXPos - ufoXPos < "20" and "5" < lYPos and lYPos < "35")
- {
- call("HitUFO");
- }
- }
-