name		 IntHeli
health		 600
type		 enemy
aimove		 chasez
aimove		 avoid
gfxshadow	 1
speed		 10
nopain		 1
cantgrab	 1
nodrop		 2
nodieblink	 2
death		 1
aggression	 200
#hostile		 player npc
animationscript  data/scripts/heli.c
takedamagescript data/scripts/blink.c

palette		 data/chars/destro_heli/intheli.png
alternatepal	 data/chars/destro_heli/intblink.png

load		 Burster
load		 Cobra_Officer2


anim spawn
	delay	1
        offset  380 145
	seta	100
	sound   data/sounds/heli1.wav
	frame	data/chars/destro_heli/intheli
	delay	150
	@cmd	dasher 1 0 0
	bbox	262 12 336 135 15
	frame	data/chars/destro_heli/intheli
	delay	15
        @cmd	spawn01 "Cobra_Officer2" 80 40 3
	frame	data/chars/destro_heli/intheli

anim idle
	loop	1
	delay	10
	seta	100
        offset  380 145
	bbox	262 12 336 135 15
	frame	data/chars/destro_heli/intheli
        @cmd	spawnEnemy "Cobra_Officer2" 80 40 3
	frame	data/chars/destro_heli/intheli

anim walk
	loop	1
	delay	10
	seta	100
        offset  380 145
	bbox	262 12 336 135 15
	frame	data/chars/destro_heli/intheli
        @cmd	spawnEnemy "Cobra_Officer2" 80 40 3
	frame	data/chars/destro_heli/intheli

anim attack1
	range	240 600
	rangez	-60 60
	delay	10
	seta	100
        offset  380 145
	bbox	262 12 336 135 15
	sound   data/sounds/heli1.wav
	frame	data/chars/destro_heli/intheli
	@cmd	target 2 2 260 0 0 0
        @cmd	spawnEnemy "Cobra_Officer2" 80 40 3
	frame	data/chars/destro_heli/intheli2
	@cmd	shootT "Burster" 260 0 0
	frame	data/chars/destro_heli/intheli3
	frame	data/chars/destro_heli/intheli4
	frame	data/chars/destro_heli/intheli3
	frame	data/chars/destro_heli/intheli4
	frame	data/chars/destro_heli/intheli3
	frame	data/chars/destro_heli/intheli4
	frame	data/chars/destro_heli/intheli3
	frame	data/chars/destro_heli/intheli4
	frame	data/chars/destro_heli/intheli3
	frame	data/chars/destro_heli/intheli4
	delay	100
        @cmd	spawnEnemy "Cobra_Officer2" 80 40 3
	frame	data/chars/destro_heli/intheli

anim attack2
@script
    if( frame == 0){
      void self = getlocalvar("self");
      int r = rand()%30;

      if( r > 0){
        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW2"));
      }
    }
@end_script
	range	0 240
	rangez	-50 50
	delay	1
	seta	100
        offset  380 145
	bbox	262 12 336 135 15
	sound   data/sounds/heli1.wav
	frame	data/chars/destro_heli/intheli
	delay	10
	frame	data/chars/destro_heli/intheli
	delay	500
	@cmd	dasher 1.5 0 0
        @cmd	spawnEnemy "Cobra_Officer2" 80 40 3
	frame	data/chars/destro_heli/intheli
	delay	50
	@cmd	dasher 0 0 0
        @cmd	spawnEnemy "Cobra_Officer2" 80 40 3
	frame	data/chars/destro_heli/intheli

anim follow2
	delay	1
	seta	100
        offset  380 145
	bbox	262 12 336 135 15
	sound   data/sounds/heli1.wav
	frame	data/chars/destro_heli/intheli
	delay	10
	frame	data/chars/destro_heli/intheli
	delay	200
	@cmd	dasher -1.5 0 0
        @cmd	spawnEnemy "Cobra_Officer2" 80 40 3
	frame	data/chars/destro_heli/intheli
	delay	50
	@cmd	dasher 0 0 0
        @cmd	spawnEnemy "Cobra_Officer2" 80 40 3
	frame	data/chars/destro_heli/intheli


anim death
	delay	100
        offset  380 145
	seta	-1
	frame	data/chars/destro_heli/intheli2
	delay	10
	@cmd	spawn01 "BXPlos2" 0 0 0
	frame	data/chars/destro_heli/intheli2
	delay	200
	frame	data/chars/misc/empty.gif
