home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer 2000 January / CD-Gamer_2000-01_04_cd.bin / games / phoenix.exe / Tactics / Dogfight / turret.tac < prev   
Text File  |  1999-08-15  |  603b  |  31 lines

  1. A: TURRET
  2. B: FIGHTER;TURRET;BOMBER;FIGHTER2;EMPLACEMENT
  3.  
  4. Targets(B)
  5.  
  6. Start(A)
  7.  
  8. // Pick the closest enemy every second, after an initial period of 5 seconds.
  9. Lock(B)
  10. Do(SayIm[A,"ATTACK",B])
  11. StopAndFire(AB)
  12. Timer(A,4000)
  13. Label(FIRST_ATTACK_LOOP)
  14. If(Timer[A]): Goto(FIRST_ATTACK_LOOP)
  15.  
  16. Label(PICK_NEW_TARGET)
  17. If(GetCloserTarget[A,B]): Lock(B)
  18. Do(SayIm[A,"ATTACK",B])
  19. StopAndFire(AB)
  20.  
  21. Timer(A,1000)
  22. Label(ATTACK_LOOP)
  23. If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
  24. If(Timer[A]): Goto(ATTACK_LOOP)
  25. Goto(PICK_NEW_TARGET)
  26.  
  27. Label(SHOT_BY_OTHER)
  28. Split(AF,turret)
  29. Label(DONE)
  30. Goto(DONE)
  31.