
/* MILITARY ZONE - Game name "MILITARY BASE " */


/* ------------- SETUP INFO ------------------*/

PLAY_TIME 4800

SKIP_MINI_GAMES

FAR_CLIP 60000

// Arena
LANDSCAPE militarymesh.obe 0 0 0
	ACTOR_DONT_STATIC_LIGHT
	ACTOR_DONT_FOG

// Beneath arena
PLATFORM_BACKGROUND milt_engineplatform.obe 0 0 0
	ANIMATE flame 1 0 0.3 0.1
	ACTOR_DONT_LIGHT

// Sky
PLATFORM_BACKGROUND military_back.obe 0 -300 0
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT
	

// Clouds
ADD_SLIDDING_TEXTURE_MODEL mist.obe 0 600 0 	0 0.002  1
ADD_SLIDDING_TEXTURE_MODEL mist.obe 0 800 0 	0 0.003  1
ADD_SLIDDING_TEXTURE_MODEL mist.obe 0 1200 0 	0 0.005  1


RESPAWN_POINT 100 8000 -700
RESPAWN_POINT 300 8000 -100
RESPAWN_POINT 700 8000 -700
RESPAWN_POINT 900 8000 -100

/* ------------------- CAMERA --------------------*/

CAMERA_ROT -0.45
CAMERA_ORIGIN -600 0 2500


INTRO_CAM     military1.lom
INTRO_CAM_LOW_DETAIL
INTRO_CAM     military2.lom
INTRO_CAM     military3.lom
INTRO_CAM     military4.lom
INTRO_CAM     military5.lom


WINNER_CAM
// campos
	710	400	-1525
//winners
	330	 0 	-900
	540	 0 	-790
	180	 0 	-1060
	710	 0 	-730
// losers
	-5	 0	-665
	545	 0	-415
	255	 0	-495




/* ------------------- FOG ---------------------*/


//orange

FOG  3000  50000  96 71 12

	
/* -------------- SCENIC LIGHTING ---------------*/



AMBIENTLIGHT 150 150 130	


DIRECTIONAL_LIGHT 230 255 244  -0.4 3.0


//                    	xRot    yRot   zRot
SHADOW DIRECTIONAL       0.7	0	0 




/* ------------------ SFX ----------------------*/


// SFX

#define SFX_AIR_RAID_SIREN 1
#define SFX_BOMB_FALLING_1 2
#define SFX_BOMB_FALLING_2 3
#define SFX_BOMB_IMPACT_1 4
#define SFX_BOMB_IMPACT_2 5
#define SFX_BOMB_IMPACT_3 6
#define SFX_BOMB_IMPACT_4 7
#define SFX_GLASS_BREAKING 8
#define SFX_SHIP_SWOOP_1 9
#define SFX_SHIP_SWOOP_2 10
#define SFX_SHIP_SWOOP_3 11
#define SFX_LIGHTS_ON 12
#define SFX_BOMB_TICK_DOWN 13
#define SFX_SHIP_APPROACH 14
#define SFX_SHIP_HOVVER_LOOP 15
#define SFX_SHIP_LANDS 16
#define SFX_SHIP_LANDS_CLUNK 17
#define SFX_SHIP_TAKES_OFF 18
#define SFX_SHIP_BOOSTS 19
#define SFX_AMB_WIND 20


SAMPLE military_01a.wav SFX_AIR_RAID_SIREN
SAMPLE military_02a.wav SFX_BOMB_FALLING_1
SAMPLE military_02b.wav SFX_BOMB_FALLING_2
SAMPLE military_03a.wav SFX_BOMB_IMPACT_1
SAMPLE military_03d.wav SFX_BOMB_IMPACT_2
SAMPLE military_03e.wav SFX_BOMB_IMPACT_3
SAMPLE military_03g.wav SFX_BOMB_IMPACT_4
SAMPLE military_07b.wav SFX_GLASS_BREAKING
SAMPLE military_16a.wav SFX_SHIP_SWOOP_1
SAMPLE military_16b.wav SFX_SHIP_SWOOP_2
SAMPLE military_16c.wav SFX_SHIP_SWOOP_3
SAMPLE military_06a.wav SFX_LIGHTS_ON
SAMPLE military_04a.wav SFX_BOMB_TICK_DOWN
SAMPLE military_10a.wav SFX_SHIP_APPROACH 
SAMPLE military_11a.wav SFX_SHIP_HOVVER_LOOP
SAMPLE military_12a.wav SFX_SHIP_LANDS 
SAMPLE military_13a.wav SFX_SHIP_LANDS_CLUNK
SAMPLE military_14a.wav SFX_SHIP_TAKES_OFF 
SAMPLE military_15a.wav SFX_SHIP_BOOSTS 
SAMPLE tanks_01a.wav SFX_AMB_WIND


#define TEMP_VOL 255



PUZZLE START_OF_FIRST_HALF
	ACTION PLAY_SAMPLE SFX_AMB_WIND TEMP_VOL 0 0
	ACTION PLAY_SAMPLE SFX_SHIP_SWOOP_3 TEMP_VOL 0 0



/* ------------------------------- GAME ------------------------------*/


/* --------------------- GOAL --------------------------*/


#define GOAL_EFFECT_1 1
#define GOAL_EFFECT_2 2
	
PLATFORM goalbase.obe 1000 20 -1000
	TEXTURE_ANIM  activegoalanim.gif  1
	GOAL 
	ACTOR_DONT_LIGHT

PLATFORM goalbase.obe -1000 20 -1000
	TEXTURE_ANIM  activegoalanim.gif  1
	GOAL 
	ACTOR_DONT_LIGHT

PLATFORM_BACKGROUND goaleffect.obe  1000 -20 -1000
	TAG GOAL_EFFECT_1
	TEXTURE_ANIM  goalsign_anim.gif  1
	ACTOR_DONT_LIGHT

PLATFORM_BACKGROUND goaleffect.obe  -1000 -20 -1000
	TAG GOAL_EFFECT_2
	TEXTURE_ANIM  goalsign_anim.gif  1
	ACTOR_DONT_LIGHT
	

PUZZLE START_OF_FIRST_HALF
	ACTION ANIMATE_PLATFORM GOAL_EFFECT_1	active 1  0  0.5  0.1  0
	ACTION ANIMATE_PLATFORM GOAL_EFFECT_2	active 1  0  0.5  0.1  0
	ACTION SET_TEXTURE_ANIM_SPEED  GOAL_EFFECT_1  		1  0  0
	ACTION SET_TEXTURE_ANIM_SPEED  GOAL_EFFECT_2  		1  0  0


/* --------------------- BUTTON ------------------ */

#define AIR_RAID_BUTTON_1 101

#define GLASS_1 99


PLATFORM brb.obe -100 400 600
	BIGREDBUTTON AUTOMATIC 125 3.2 1
	TAG AIR_RAID_BUTTON_1
	ACTOR_DONT_STATIC_LIGHT


PLATFORM glass.obe -100 400 500
	TAG GLASS_1
	DESTRUCT 
	REMAINS   glass_smash.obe    0.5  REMAINS_NOCOLL
//                                animSpeed
	ACTOR_DONT_LIGHT


PUZZLE PLATFORM_DESTROYED GLASS_1
	NUMTIMES 1
	ACTION PLAY_SAMPLE SFX_GLASS_BREAKING TEMP_VOL 0 0
	
	

/*--------------------  AIR RAID  -------------------*/

#define RAID_DURATION 120
#define BOMB_RATE 20

#define VELX_1 0
#define VELZ_1 0
#define MINX_1 1100	
#define MINZ_1 -1100	
#define MAXX_1 900	
#define MAXZ_1 -900	


// Goal on left
#define VELX_2 0
#define VELZ_2 0
#define MINX_2 -1100
#define MINZ_2 -1100
#define MAXX_2 -900
#define MAXZ_2 -900


#define RESET_RAID_DELAY 900
#define SIREN_GLOW 44


// Warning spinning siren
PLATFORM_BACKGROUND siren.obe -895 670 100
	TAG SIREN_GLOW
	//ACTOR_ADDITIVE
	ACTOR_DONT_LIGHT
	ACTOR_DONT_FOG
	ROTATEKEY 0 0 0 0
	ROTATEKEY 0 180 0 30
	ROTATEKEY 0 360 0 60
	BEHAVIOUR LOOP
	SPEED 1
	INACTIVE


PUZZLE START_OF_FIRST_HALF 
	ACTION RESET_BRB AIR_RAID_BUTTON_1 0
	ACTION SET_PLATFORM_ALPHA SIREN_GLOW 0 0



PUZZLE BRB_JUST_DOWN AIR_RAID_BUTTON_1 0
	// Air Raid on goal area on right
	ACTION AIR_RAID  RAID_DURATION BOMB_RATE MINX_1 MINZ_1 MAXX_1 MAXZ_1 0 VELX_1 VELZ_1 60
	
	// Air Raid on goal area on left
	ACTION AIR_RAID  RAID_DURATION 18 MINX_2 MINZ_2 MAXX_2 MAXZ_2 0 VELX_2 VELZ_2 60
	
	// SFX
	ACTION PLAY_SAMPLE SFX_AIR_RAID_SIREN TEMP_VOL 0 0
	
	// Siren lights
	ACTION ACTIVATE_PLATFORM SIREN_GLOW 0
	ACTION SET_PLATFORM_TARGET_ALPHA SIREN_GLOW 255 10 0
	ACTION SET_PLATFORM_TARGET_ALPHA SIREN_GLOW 0 10 200
	ACTION SPRITE_ONOFF SPRITE_SIREN 1 0
	ACTION SPRITE_ONOFF SPRITE_SIREN 0 260
	
	// Bomb SFX
	ACTION PLAY_SAMPLE SFX_BOMB_FALLING_1 170 0 80
	ACTION PLAY_SAMPLE SFX_BOMB_FALLING_2 170 0 100
	ACTION PLAY_SAMPLE SFX_BOMB_FALLING_1 170 0 150
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_1 TEMP_VOL 0 90
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_3 TEMP_VOL 0 110
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 TEMP_VOL 0 140
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_4 TEMP_VOL 0 150
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_3 TEMP_VOL 0 170
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_1 TEMP_VOL 0 180
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_4 TEMP_VOL 0 200
	
	//ACTION SHAKE_CAMERA 5 10 	120
	//ACTION SHAKE_CAMERA 10 20 	140
	//ACTION SHAKE_CAMERA 5 10 	160
	//ACTION SHAKE_CAMERA 20 30 	180
	//ACTION SHAKE_CAMERA 20 60 	200
	
	// Deativate button during raid
	ACTION ACTIVATE_BRB AIR_RAID_BUTTON_1 0 0
	ACTION SPRITE_ONOFF SPRITE_BUTTON 0 0
	ACTION ACTIVATE_BRB AIR_RAID_BUTTON_1 1 RESET_RAID_DELAY
	ACTION SPRITE_ONOFF SPRITE_BUTTON 1 RESET_RAID_DELAY
	


/* -------------- MINES AND SEARCHLIGHTS ---------------------*/

/* A circle of mines lands periodically with a super orb in the centre.
When the bombs aren't there, a searchlight patrols. */

BOMB_POS 300 1500 -960		201 1
BOMB_POS 300 1500 -620		202 2
BOMB_POS 0 1500 -470		203 3
BOMB_POS -300 1500 -620		204 4
BOMB_POS -300 1500 -960		205 5
BOMB_POS 0 1500 -1120		206 6


#define LIGHT_SCALE 1
#define LIGHT_1 301


SEARCHLIGHT_WITHTURRET light_cone_short.obe 0 2500 200 LIGHT_SCALE LIGHT_1 0 gun_turret.obe mil_gunl -1600 550 -399
	MOVEKEY 1200  0  -830 0
	MOVEKEY -1200  0 -830 180
	SPEED 1
	BEHAVIOUR BOUNCE
	TIME_LIMIT 60
	INACTIVE
	


// Trigger bombs and lights alternately--------------------

PUZZLE AFTER_TIME 800
	NUMTIMES 1
	ACTION PLAY_SAMPLE SFX_LIGHTS_ON TEMP_VOL 0 0
	ACTION ACTIVATE_SEARCHLIGHTS LIGHT_1 60
	ACTION DEACTIVATE_SEARCHLIGHTS LIGHT_1 600



PUZZLE AFTER_TIME 1800 
	NUMTIMES 1
	ACTION CREATE_TILE_GROUP SUPER 5 0 0
	ACTION DESTROY_TILE_GROUP 5 300

	// Circle
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 1  1  1  0
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 2  1  1  10
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 3  1  1  20
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 4  1  1  30
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 5  1  1  40
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 6  1  1  50
	
	ACTION SPRITE_ONOFF SPRITE_MINE_1 1 60
	ACTION SPRITE_ONOFF SPRITE_MINE_2 1 70
	ACTION SPRITE_ONOFF SPRITE_MINE_3 1 80
	ACTION SPRITE_ONOFF SPRITE_MINE_4 1 90
	ACTION SPRITE_ONOFF SPRITE_MINE_5 1 100
	ACTION SPRITE_ONOFF SPRITE_MINE_6 1 110

	ACTION SPRITE_ONOFF SPRITE_MINE_1 0 240
	ACTION SPRITE_ONOFF SPRITE_MINE_2 0 250
	ACTION SPRITE_ONOFF SPRITE_MINE_3 0 260
	ACTION SPRITE_ONOFF SPRITE_MINE_4 0 270
	ACTION SPRITE_ONOFF SPRITE_MINE_5 0 280
	ACTION SPRITE_ONOFF SPRITE_MINE_6 0 290
	
	ACTION EXPLODE_BOMB 201 60
	ACTION EXPLODE_BOMB 202 70
	ACTION EXPLODE_BOMB 203 80
	ACTION EXPLODE_BOMB 204 90
	ACTION EXPLODE_BOMB 205 100
	ACTION EXPLODE_BOMB 206 110

	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 100
	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 110
	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 120
	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 130

	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 240
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 250
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 260
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 270
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 280
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 290
	
	//ACTION SHAKE_CAMERA 20 45 200


PUZZLE AFTER_TIME 2400
	NUMTIMES 1
	ACTION PLAY_SAMPLE SFX_LIGHTS_ON TEMP_VOL 0 0
	ACTION ACTIVATE_SEARCHLIGHTS LIGHT_1 60
	ACTION DEACTIVATE_SEARCHLIGHTS LIGHT_1 420




PUZZLE AFTER_TIME 3000
	NUMTIMES 1
	ACTION CREATE_TILE_GROUP SUPER 5 0 0
	ACTION DESTROY_TILE_GROUP 5 300

	// Circle
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 1  1  1  0
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 2  1  1  10
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 3  1  1  20
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 4  1  1  30
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 5  1  1  40
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 6  1  1  50
	
	ACTION SPRITE_ONOFF SPRITE_MINE_1 1 60
	ACTION SPRITE_ONOFF SPRITE_MINE_2 1 70
	ACTION SPRITE_ONOFF SPRITE_MINE_3 1 80
	ACTION SPRITE_ONOFF SPRITE_MINE_4 1 90
	ACTION SPRITE_ONOFF SPRITE_MINE_5 1 100
	ACTION SPRITE_ONOFF SPRITE_MINE_6 1 110

	ACTION SPRITE_ONOFF SPRITE_MINE_1 0 240
	ACTION SPRITE_ONOFF SPRITE_MINE_2 0 250
	ACTION SPRITE_ONOFF SPRITE_MINE_3 0 260
	ACTION SPRITE_ONOFF SPRITE_MINE_4 0 270
	ACTION SPRITE_ONOFF SPRITE_MINE_5 0 280
	ACTION SPRITE_ONOFF SPRITE_MINE_6 0 290
	

	ACTION EXPLODE_BOMB 201 60
	ACTION EXPLODE_BOMB 202 70
	ACTION EXPLODE_BOMB 203 80
	ACTION EXPLODE_BOMB 204 90
	ACTION EXPLODE_BOMB 205 100
	ACTION EXPLODE_BOMB 206 110

	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 100
	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 110
	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 120
	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 130

	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 240
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 250
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 260
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 270
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 280
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 290

	//ACTION SHAKE_CAMERA 20 45 200
	

	

PUZZLE AFTER_TIME 4200 
	NUMTIMES 1
	ACTION CREATE_TILE_GROUP SUPER 5 0 0
	ACTION DESTROY_TILE_GROUP 5 300

	// Circle
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 1  1  1  0
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 2  1  1  10
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 3  1  1  20
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 4  1  1  30
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 5  1  1  40
	ACTION CREATE_RANDOM_BOMBS PROXIMITY 6  1  1  50
	
	ACTION SPRITE_ONOFF SPRITE_MINE_1 1 60
	ACTION SPRITE_ONOFF SPRITE_MINE_2 1 70
	ACTION SPRITE_ONOFF SPRITE_MINE_3 1 80
	ACTION SPRITE_ONOFF SPRITE_MINE_4 1 90
	ACTION SPRITE_ONOFF SPRITE_MINE_5 1 100
	ACTION SPRITE_ONOFF SPRITE_MINE_6 1 110

	ACTION SPRITE_ONOFF SPRITE_MINE_1 0 240
	ACTION SPRITE_ONOFF SPRITE_MINE_2 0 250
	ACTION SPRITE_ONOFF SPRITE_MINE_3 0 260
	ACTION SPRITE_ONOFF SPRITE_MINE_4 0 270
	ACTION SPRITE_ONOFF SPRITE_MINE_5 0 280
	ACTION SPRITE_ONOFF SPRITE_MINE_6 0 290
	

	ACTION EXPLODE_BOMB 201 60
	ACTION EXPLODE_BOMB 202 70
	ACTION EXPLODE_BOMB 203 80
	ACTION EXPLODE_BOMB 204 90
	ACTION EXPLODE_BOMB 205 100
	ACTION EXPLODE_BOMB 206 110

	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 100
	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 110
	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 120
	ACTION PLAY_SAMPLE SFX_BOMB_TICK_DOWN 	TEMP_VOL 0 130

	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 240
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 250
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 260
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 270
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 280
	ACTION PLAY_SAMPLE SFX_BOMB_IMPACT_2 	TEMP_VOL 0 290

	//ACTION SHAKE_CAMERA 20 45 200




/* ----------------------- ORB HANDLING  -------------------*/


#define GOLDEN PERSONALISED


PUZZLE START_OF_FIRST_HALF 
	ACTION SET_TILE_DEAL_DELAY 0 0
	ACTION ACTIVATE_TILE_GROUP 1 0


#define TILE_GENERATION_LOOP 1

PUZZLE AFTER_TIME 1 & REPEAT
	ACTION CREATE_RANDOM_TILE_GROUP 1 GOLDEN 1 1 0
	ACTION SET_VAR TILE_GENERATION_LOOP 1 NO_FLAGS 60


	

/* ---------------------- POWER UPS ----------------------*/


PUZZLE AFTER_TIME 1
	NUMTIMES 1
	ACTION CREATE_COLLECTABLE SPEEDUP 	-900 200 -100	600
	ACTION CREATE_COLLECTABLE SPEEDUP 	-500 600 900   	1200
	ACTION CREATE_COLLECTABLE SPEEDUP 	-100 0 -1000   	1800
	ACTION CREATE_COLLECTABLE SPEEDUP 	 900 200 500   	2400
	ACTION CREATE_COLLECTABLE SUPER_ATTACK 	 300 400 900 	1500
	ACTION CREATE_COLLECTABLE INVINCIBILITY  1100 0 -100	2600
	

/* ----------------- ORB POSITIONS -----------------------*/

// Centre of mine circle
TILE_POSITION 0 0 -800		5 SUPER


// Used to be gold orbs on the top row
TILE_POSITION -1100 400 -100	1 SUPER
TILE_POSITION 100 600 1100 	1 SUPER
TILE_POSITION -100 600 1100 	1 SUPER
TILE_POSITION -300 600 1100 	1 SUPER
TILE_POSITION -500 600 1100 	1 SUPER
TILE_POSITION -700 600 1100 	1 SUPER
TILE_POSITION -900 600 1100 	1 SUPER

TILE_POSITION 900 0 -300	1 GOLDEN
TILE_POSITION 1100 0 -300	1 GOLDEN
TILE_POSITION 900 0 -500	1 GOLDEN
TILE_POSITION 1100 0 -500	1 GOLDEN
TILE_POSITION -1100 0 -500	1 GOLDEN
TILE_POSITION -900 0 -500	1 GOLDEN
//TILE_POSITION 1100 0 -100	1 GOLDEN
TILE_POSITION 700 0 -900	1 GOLDEN
TILE_POSITION 700 0 -500	1 GOLDEN
TILE_POSITION 700 0 -300	1 GOLDEN
TILE_POSITION 700 0 -100	1 GOLDEN
TILE_POSITION 500 0 -1100	1 GOLDEN
TILE_POSITION 500 0 -900	1 GOLDEN
TILE_POSITION 500 0 -700	1 GOLDEN
TILE_POSITION 500 0 -500	1 GOLDEN
TILE_POSITION 500 0 -300	1 GOLDEN
TILE_POSITION 500 0 -100	1 GOLDEN
////TILE_POSITION 300 0 -1100	1 GOLDEN
////TILE_POSITION 300 0 -900	1 GOLDEN
////TILE_POSITION 300 0 -700	1 GOLDEN
////TILE_POSITION 300 0 -500	1 GOLDEN
TILE_POSITION 300 0 -300	1 GOLDEN
////TILE_POSITION 100 0 -1100	1 GOLDEN
////TILE_POSITION 100 0 -900	1 GOLDEN
////TILE_POSITION 100 0 -500	1 GOLDEN
////TILE_POSITION -100 0 -1100	1 GOLDEN
////TILE_POSITION -100 0 -900	1 GOLDEN
////TILE_POSITION -100 0 -700	1 GOLDEN
////TILE_POSITION -100 0 -500	1 GOLDEN
////TILE_POSITION -300 0 -1100	1 GOLDEN
////TILE_POSITION -300 0 -900	1 GOLDEN
////TILE_POSITION -300 0 -700	1 GOLDEN
////TILE_POSITION -300 0 -500	1 GOLDEN
TILE_POSITION -500 0 -700	1 GOLDEN
TILE_POSITION -500 0 -500	1 GOLDEN
TILE_POSITION -500 0 -300	1 GOLDEN
TILE_POSITION -500 0 -100	1 GOLDEN
TILE_POSITION -700 0 -300	1 GOLDEN
TILE_POSITION -700 0 -100	1 GOLDEN
TILE_POSITION -700 0 -700	1 GOLDEN
//TILE_POSITION -700 0 -900	1 GOLDEN
//TILE_POSITION -700 0 -1100	1 GOLDEN
TILE_POSITION -700 0 -500	1 GOLDEN
TILE_POSITION -900 0 -300	1 GOLDEN
TILE_POSITION -500 0 -1100	1 GOLDEN
TILE_POSITION -500 600 700	1 GOLDEN
TILE_POSITION -1100 0 -300	1 GOLDEN
TILE_POSITION -500 0 -900	1 GOLDEN
TILE_POSITION 1100 200 100	1 GOLDEN
TILE_POSITION 1100 200 300	1 GOLDEN
TILE_POSITION 1100 200 500	1 GOLDEN
TILE_POSITION 1100 200 700	1 GOLDEN
TILE_POSITION 1100 200 900	1 GOLDEN
TILE_POSITION 900 200 100	1 GOLDEN
TILE_POSITION 900 200 300	1 GOLDEN
//TILE_POSITION 900 200 500	1 GOLDEN
TILE_POSITION 900 200 700	1 GOLDEN
TILE_POSITION 900 200 900	1 GOLDEN
TILE_POSITION 700 200 100	1 GOLDEN
TILE_POSITION 700 200 300	1 GOLDEN
TILE_POSITION 700 200 500	1 GOLDEN
TILE_POSITION 700 200 700	1 GOLDEN
TILE_POSITION 700 200 900	1 GOLDEN
TILE_POSITION 500 200 100	1 GOLDEN
TILE_POSITION 500 200 300	1 GOLDEN
TILE_POSITION 300 200 100	1 GOLDEN
TILE_POSITION 300 200 300	1 GOLDEN
TILE_POSITION 300 400 500	1 GOLDEN
TILE_POSITION 300 400 700	1 GOLDEN
//TILE_POSITION 300 400 900	1 GOLDEN
TILE_POSITION 100 400 100	1 GOLDEN
TILE_POSITION 100 400 300	1 GOLDEN
TILE_POSITION -100 400 100	1 GOLDEN
TILE_POSITION -100 400 300	1 GOLDEN
TILE_POSITION -300 400 100	1 GOLDEN
TILE_POSITION -300 400 300	1 GOLDEN
TILE_POSITION -500 400 100	1 GOLDEN
TILE_POSITION -500 400 300	1 GOLDEN
TILE_POSITION -700 400 100	1 GOLDEN
TILE_POSITION -700 400 300	1 GOLDEN
TILE_POSITION 700 0 -1100	1 GOLDEN
TILE_POSITION -700 600 700	1 GOLDEN
//TILE_POSITION -900 200 -100	1 GOLDEN



/*---------------------- SCENIC OBJECTS -------------------------*/


/* --------------- Ships --------------------*/

// ------------ Attackship ---------------------

#define SHIP 10


PLATFORM_BACKGROUND attackship1.obe -13450 800 40000
	// Setup
	TAG SHIP
	ANIMATE bank 1 0 0.3 0.1
	PLATFORM_TRAIL streak_left2
	PLATFORM_TRAIL streak_left4 
	PLATFORM_TRAIL streak_right2 
	PLATFORM_TRAIL streak_right4

	// Fly from back to front
	MOVEKEY -13450 800 40000 	0
	MOVEKEY 6230 1000 -10200 	900
	ROTATEKEY 0 0 0 		0
	ROTATEKEY 0 315 0 		1
	
	// Fly from behind right-hand building to left
	MOVEKEY 6230 1000 -10200 	1800
	MOVEKEY -1340 0 40160 		1801
	MOVEKEY -3600 2000 -2860 	2600
	ROTATEKEY 0 315 0 		1800
	ROTATEKEY 0 15 0 		1801

	// Fly from front to back
	MOVEKEY 6230 1000 -10200 	3600
	MOVEKEY -13450 800 40000 	4500
	ROTATEKEY 0 15 0 		3600
	ROTATEKEY 0 135 0 		3601

	BEHAVIOUR STOP
	SPEED 0
	ACTOR_DONT_STATIC_LIGHT


PUZZLE AFTER_TIME 1
	NUMTIMES 1
	ACTION ACTIVATE_PLATFORM_TRAILS  SHIP   1  0 
	ACTION SET_PLATFORM_SPEED SHIP 1 NO_FLAGS 	0         
	//ACTION CREATE_LIGHT_AT_PLATFORM  SHIP  attackship  0 -100 0   7000   0   127 100 0   0
	
	ACTION ACTIVATE_PLATFORM_LIGHTS 1 500
	ACTION ACTIVATE_PLATFORM_LIGHTS 0 1000
	ACTION ACTIVATE_PLATFORM_LIGHTS 1 3600
	ACTION ACTIVATE_PLATFORM_LIGHTS 0 4000
	
	ACTION PLAY_SAMPLE SFX_SHIP_SWOOP_1 TEMP_VOL 0 		720  
	ACTION PLAY_SAMPLE SFX_SHIP_SWOOP_2 TEMP_VOL 0 		3620



// ----------------- Fly glider -----------------

#define FLYGLIDER 11
#define FLYGLIDER_SMOKE 55


PLATFORM_BACKGROUND flyglider.obe 6980 1000 1090
	TAG FLYGLIDER
	ANIMATE fly 1 0 1 0.1
	PLATFORM_TRAIL streak2
	PLATFORM_TRAIL streak3
	PLATFORM_TRAIL streak4
	// right to left
	MOVEKEY 6980 1000 1090 0
	MOVEKEY -10020 3000 6840 400
	ROTATEKEY 0 0 0 0
	ROTATEKEY 0 110 0 1
	// left to right
	MOVEKEY -10020 3000 6840 600
	MOVEKEY -10000 -1740 -2600 601
	MOVEKEY 1390 2480 12000 1000
	ROTATEKEY 0 110 0 600
	ROTATEKEY 0 207 0 601
	BEHAVIOUR LOOP
	SPEED 0
	INACTIVE
	ACTOR_DONT_LIGHT


PUZZLE AFTER_TIME 1
	NUMTIMES 1
	ACTION ACTIVATE_PLATFORM FLYGLIDER 300
	ACTION SET_PLATFORM_SPEED FLYGLIDER 1 NO_FLAGS 300
	ACTION ACTIVATE_PLATFORM_TRAILS  FLYGLIDER   1  300 




// -------------------- Glider -------------------


#define GLIDER 12
#define GLIDER_SMOKE_LEFT 56
#define GLIDER_SMOKE_RIGHT 57

PLATFORM_BACKGROUND glider.obe -7130 2340 -2030
	TAG GLIDER
	ANIMATE fly 1 0 1 0.1
	PLATFORM_TRAIL streak_left
	PLATFORM_TRAIL streak_right
	// Fly in from left, dock in bulding
	MOVEKEY  -7130 2340 -2030 0
	MOVEKEY 1484 -490 6130 600
	MOVEKEY 1484 -490 6130 720
	MOVEKEY 1484 -990 6130 900
	ROTATEKEY 0 0 0 0
	ROTATEKEY 0 225 0 1
	ROTATEKEY 0 225 0 600
	ROTATEKEY 0 45 0 720
	// Fly out of building
	MOVEKEY 1484 -990 6130 1600
	MOVEKEY 1484 -490 6130 1800
	MOVEKEY  -7130 2340 -2030 2400
	BEHAVIOUR LOOP
	SPEED 0
	INACTIVE
	ACTOR_DONT_LIGHT

/*
// Movement JetS
// Left Jet
NEW_VENT STREAK3  0 0 0 GLIDER_SMOKE_LEFT 0 	3
	VENT_POS -7068 2376 -1714	20 10
	VENT_PATTERN 0 10
	VENT_VEL 0 0 20 		0 0
	VENT_PLATFORM GLIDER

// Right Jet
NEW_VENT STREAK3 0 0 0 GLIDER_SMOKE_RIGHT 0 	3
	VENT_POS -7188 2376 -1714	20 10
	VENT_PATTERN 0 10
	VENT_VEL 0 0 20 		0 0
	VENT_PLATFORM GLIDER

*/
	
PUZZLE AFTER_TIME 1
	NUMTIMES 1
	ACTION ACTIVATE_PLATFORM GLIDER 600
	ACTION SET_PLATFORM_SPEED GLIDER 1 NO_FLAGS 600
	//ACTION ACTIVATE_VENT GLIDER_SMOKE_LEFT 600
	//ACTION ACTIVATE_VENT GLIDER_SMOKE_RIGHT 600
	ACTION ACTIVATE_PLATFORM_TRAILS  GLIDER   1  600 



/* ------------- Blinking beacons ------------*/

#define BLINK_RADAR_1 15
#define BLINK_RADAR_2 16
#define BLINK_RADAR_3 17


// rear spikes
PLATFORM_BACKGROUND blinker.obe -460 952 1474
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT
PLATFORM_BACKGROUND blinker.obe -83 881 1486
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT
PLATFORM_BACKGROUND blinker.obe 1126 731 1343
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT


// Hanging from underneath


PLATFORM_BACKGROUND blinker.obe -1100 -700 -1100
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT
	ROTATEKEY 0 0 0 0
	ROTATEKEY 0 0 180 1
	BEHAVIOUR STOP
	SPEED 1
	
// Front 

PLATFORM_BACKGROUND blinker.obe 408 -180 -1450
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT
	ROTATEKEY 0 0 0 0
	ROTATEKEY 90 0 0 1
	BEHAVIOUR STOP
	SPEED 1

PLATFORM_BACKGROUND blinker.obe 575 -190 -1500
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT
	ROTATEKEY 0 0 0 0
	ROTATEKEY 90 0 0 1
	BEHAVIOUR STOP
	SPEED 1


// Attached to radar

// Left
PLATFORM_BACKGROUND blinker.obe -165 135 -42
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT
	TAG BLINK_RADAR_1

// Middle
PLATFORM_BACKGROUND blinker.obe 0 565 6
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT
	TAG BLINK_RADAR_2

// Right
PLATFORM_BACKGROUND blinker.obe 165 135 -42
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT
	TAG BLINK_RADAR_3


/* ---------- Lights from gun turret ------------*/

PLATFORM_BACKGROUND gun_turret_light_glow.obe -1350 874 -123
	ACTOR_DONT_FOG
	ACTOR_DONT_LIGHT


/*--------------- Radar ----------------*/


#define RADAR 90
#define RADAR_ANIMSPEED 0.3

PLATFORM_BACKGROUND radar.obe -832 564 1336
	TAG RADAR
	ACTOR_DONT_LIGHT


PUZZLE START_OF_FIRST_HALF
	ACTION ATTACH_PLATFORM_TO_NODE BLINK_RADAR_1 RADAR radar_dish -165 135 -42 0
	ACTION ATTACH_PLATFORM_TO_NODE BLINK_RADAR_2 RADAR mil_radar 0 565 6 0
	ACTION ATTACH_PLATFORM_TO_NODE BLINK_RADAR_3 RADAR radar_dish 165 135 -42 0

PUZZLE REPEAT
	ACTION ANIMATE_PLATFORM RADAR swingleftright 1 1 RADAR_ANIMSPEED 0.1 60
	ACTION ANIMATE_PLATFORM RADAR rotateanticlockwise 1 1 RADAR_ANIMSPEED 0.1 900
	ACTION ANIMATE_PLATFORM RADAR swingup 1 1 RADAR_ANIMSPEED 0.1 1500
	
	


/* ------------ Smoke from exhaust ports -------------*/

#define PORT_SMOKE_LEFT 58
#define PORT_SMOKE_RIGHT 59


// Smoke from vertical pipes at rear of arena
// Left jet
NEW_VENT BLEND_SMOKE_BIG 80 90 80 PORT_SMOKE_LEFT   1 	0.2
	VENT_POS 696 310 1212	 	20 120
	VENT_PATTERN 0 10
	VENT_VEL 0 3 0 		1 8

// Right jet
NEW_VENT BLEND_SMOKE_BIG 100 150 100 PORT_SMOKE_RIGHT   1 	0.2
	VENT_POS 973 410 1212	 	30 150
	VENT_PATTERN 0 10
	VENT_VEL 0 3 0 		1 8




/*-------------------------- SPRITES --------------------------*/

#define DISTANCE 70


// On top of land mines

#define SPRITE_MINE_1 10
#define SPRITE_MINE_2 11
#define SPRITE_MINE_3 12
#define SPRITE_MINE_4 13
#define SPRITE_MINE_5 14
#define SPRITE_MINE_6 15

CAMERA_ALIGNED_SPRITE  300 50 -960	200 200  ai_light_glow_2.bmp 127 90 50 	90  DISTANCE  0
	TAG SPRITE_MINE_1
	
CAMERA_ALIGNED_SPRITE  300 50 -620	200 200  ai_light_glow_2.bmp 127 90 50 	90  DISTANCE  0	
	TAG SPRITE_MINE_2
	
CAMERA_ALIGNED_SPRITE    0 50 -470	200 200  ai_light_glow_2.bmp 127 90 50 	90  DISTANCE  0	
	TAG SPRITE_MINE_3
	
CAMERA_ALIGNED_SPRITE -300 50 -620	200 200  ai_light_glow_2.bmp 127 90 50 	90  DISTANCE  0	
	TAG SPRITE_MINE_4
	
CAMERA_ALIGNED_SPRITE -300 50 -960	200 200  ai_light_glow_2.bmp 127 90 50 	90  DISTANCE  0	
	TAG SPRITE_MINE_5
	
CAMERA_ALIGNED_SPRITE    0 50 -1120	200 200  ai_light_glow_2.bmp 127 90 50 	90  DISTANCE  0	
	TAG SPRITE_MINE_6



// On button when active

#define SPRITE_BUTTON 19
#define SPRITE_SIREN 20

CAMERA_ALIGNED_SPRITE -100 430 600	275 250 ai_light_glow_2.bmp 127 90 40    90 200   1
	TAG SPRITE_BUTTON


CAMERA_ALIGNED_SPRITE -895 600 100	600 600 ai_light_glow_2.bmp 127 100 100    90 200   0
	TAG SPRITE_SIREN


// Over blinking beacons

#define SPRITE_RADAR_1 21
#define SPRITE_RADAR_2 22
#define SPRITE_RADAR_3 23

#define BLINK_SPRITE_X 100
#define BLINK_SPRITE_Y 100

// Rear Spikes
CAMERA_ALIGNED_SPRITE  -460 1000 1474	BLINK_SPRITE_X BLINK_SPRITE_Y  ai_light_glow_2.bmp 100 20 10 	90  50  1
CAMERA_ALIGNED_SPRITE  -83 930 1486	BLINK_SPRITE_X BLINK_SPRITE_Y  ai_light_glow_2.bmp 100 20 10 	90  50  1
CAMERA_ALIGNED_SPRITE  1126 780 1343	BLINK_SPRITE_X BLINK_SPRITE_Y  ai_light_glow_2.bmp 100 20 10 	90  50  1

// Hanging
CAMERA_ALIGNED_SPRITE  -1100 -750 -1100	BLINK_SPRITE_X BLINK_SPRITE_Y  ai_light_glow_2.bmp 100 20 10 	90  50  1

// Front
CAMERA_ALIGNED_SPRITE  408 -180 -1500	BLINK_SPRITE_X BLINK_SPRITE_Y  ai_light_glow_2.bmp 100 20 10 	90  50  1
CAMERA_ALIGNED_SPRITE  575 -190 -1550	BLINK_SPRITE_X BLINK_SPRITE_Y  ai_light_glow_2.bmp 100 20 10 	90  50  1



// Radar
CAMERA_ALIGNED_SPRITE -165 185 -42 	BLINK_SPRITE_X BLINK_SPRITE_Y  ai_light_glow_2.bmp 100 20 10 	90  50  1
	TAG SPRITE_RADAR_1

CAMERA_ALIGNED_SPRITE 0 615 6 		BLINK_SPRITE_X BLINK_SPRITE_Y  ai_light_glow_2.bmp 100 20 10 	90  50  1
	TAG SPRITE_RADAR_2

CAMERA_ALIGNED_SPRITE 165 185 -42 	BLINK_SPRITE_X BLINK_SPRITE_Y  ai_light_glow_2.bmp 100 20 10 	90  50  1
	TAG SPRITE_RADAR_3

PUZZLE START_OF_FIRST_HALF
	ACTION ATTACH_SPRITE_TO_NODE SPRITE_RADAR_1 RADAR radar_dish -165 185 -42 0
	ACTION ATTACH_SPRITE_TO_NODE SPRITE_RADAR_2 RADAR mil_radar 0 615 6 0
	ACTION ATTACH_SPRITE_TO_NODE SPRITE_RADAR_3 RADAR radar_dish 165 185 -42 0



/* ------------- sorting sorting -------------*/

// These things have to be listed last to draw first to sort correctly with alpha polys in the foreground...

// Periphery
BACKGROUND militaryperiphery.obe 0 0 0 
	ACTOR_DONT_LIGHT


	