//SC2 mission script


PLAYER_PED p1 = ( 4.0 , 164.0 , 255.0 ) 8 180 

FORWARD murder:
FORWARD boomdark:


//map setup

OBJ_DATA powerstation_1 =  ( 174.5 , 107.5 , 6.0 ) 0 powergen 


SET_GANG_INFO ( gng1 , 1 , pistol , molotov , flame_thrower , 1 , 163.5 , 46.5 , 4.0 , 1 , STRIPETB , -1 )

SET_GANG_INFO ( gng2 , 2 , pistol , silenced_machine_gun , rocket_launcher , 7 , 81.5 , 213.0 , 2.0 , 1 , stratos , -1 )

SET_GANG_INFO ( gng3 , 3 , pistol , shotgun , machine_gun , 5 , 249.5 , 224.5 , 2.0 , 1 , stratosb , -1 ) 




MAP_ZONE m01 = ( 300 , 500 , 0 , 400 , 700 , 0 , 10 , 10 , 0 , 100 , 0 )
MAP_ZONE m02 = ( 700 , 300 , 200 , 200 , 700 , 10 , 10 , 10 , 100 , 10 , 100 )
MAP_ZONE m03 = ( 400 , 100 , 400 , 100 , 600 , 10 , 10 , 10 , 100 , 10 , 100 )
MAP_ZONE m04 = ( 400 , 100 , 300 , 100 , 600 , 10 , 10 , 10 , 100 , 10 , 100 )

MAP_ZONE m05 = ( 300 , 200 , 200 , 100 , 400 , 10 , 10 , 100 , 600 , 0 , 200 )
MAP_ZONE m06 = ( 500 , 300 , 200 , 100 , 800 , 10 , 10 , 10 , 300 , 10 , 100 )
MAP_ZONE m07 = ( 700 , 400 , 100 , 200 , 600 , 10 , 10 , 10 , 100 , 10 , 100 )

MAP_ZONE m08 = ( 900 , 200 , 300 , 300 , 900 , 50 , 10 , 10 , 100 , 10 , 200 )
MAP_ZONE m09 = ( 900 , 300 , 200 , 300 , 900 , 10 , 70 , 10 , 400 , 10 , 200 )
MAP_ZONE m10 = ( 900 , 300 , 200 , 300 , 900 , 40 , 30 , 10 , 400 , 10 , 200 )
MAP_ZONE m11 = ( 900 , 300 , 200 , 300 , 900 , 20 , 10 , 10 , 400 , 10 , 200 )

MAP_ZONE m12 = ( 400 , 300 , 200 , 100 , 600 , 10 , 10 , 10 , 100 , 10 , 100 )

MAP_ZONE m13 = ( 400 , 400 , 100 , 200 , 600 , 0 , 10 , 40 , 100 , 30 , 100 )
MAP_ZONE m14 = ( 600 , 400 , 100 , 200 , 600 , 10 , 10 , 200 , 200 , 10 , 100 )
MAP_ZONE m15 = ( 500 , 200 , 300 , 200 , 700 , 100 , 50 , 10 , 600 , 10 , 300 )
MAP_ZONE m16 = ( 0 , 0 , 0 , 0 , 400 , 0 , 0 , 0 , 1000 , 0 , 0 )
MAP_ZONE m17 = ( 700 , 200 , 300 , 200 , 600 , 100 , 10 , 10 , 600 , 10 , 300 )



OBJ_DATA yellow_phone1 = ( 249.5 , 224.5 , 2.0 ) 180 yellow_phone

OBJ_DATA red_phone1 = ( 81.5 , 213.0 , 2.0 ) 270 red_phone
OBJ_DATA red_phone2 = ( 122.5 , 216.0 , 2.0 ) 90 red_phone

OBJ_DATA green_phone1 = (  163.5 , 46.5 , 4.0 ) 90 green_phone


// mission failed flags

SAVED_COUNTER failed_yellow_phone1 = 0

SAVED_COUNTER failed_red_phone1 = 0
SAVED_COUNTER failed_red_phone2_m1 = 0
SAVED_COUNTER failed_red_phone2_m2 = 0

SAVED_COUNTER failed_green_phone1 = 0


// mission passed flags

SAVED_COUNTER passed_yellow_phone1 = 0

SAVED_COUNTER passed_red_phone1 = 0
SAVED_COUNTER passed_red_phone2_m1 = 0
SAVED_COUNTER passed_red_phone2_m2 = 0

SAVED_COUNTER passed_green_phone1 = 0



// mission played flags	  

SAVED_COUNTER played_yellow_phone1 = 0

SAVED_COUNTER played_red_phone1 = 0
SAVED_COUNTER played_red_phone2_m1 = 0
SAVED_COUNTER played_red_phone2_m2 = 0

SAVED_COUNTER played_green_phone1 = 0



// on mission flags

SAVED_COUNTER flag_on_mission = 0 

DECLARE_MISSION_FLAG ( p1 , flag_on_mission )


SAVED_COUNTER flag_on_yellow_mission = 0

SAVED_COUNTER flag_on_red_mission = 0

SAVED_COUNTER flag_on_green_mission = 0


SAVED_COUNTER flag_yellow_missions_passed = 0

SAVED_COUNTER flag_red_missions_passed = 0

SAVED_COUNTER flag_green_missions_passed = 0

SAVED_COUNTER flag_yellow_missions_failed = 0

SAVED_COUNTER flag_red_missions_failed = 0

SAVED_COUNTER flag_green_missions_failed = 0

SAVED_COUNTER flag_all_missions_passed = 0

SAVED_COUNTER flag_all_missions_failed = 0


DECLARE_GANG_ONE_MISSIONS_PASSED_FLAG ( flag_yellow_missions_passed ) 

DECLARE_GANG_TWO_MISSIONS_PASSED_FLAG ( flag_red_missions_passed ) 

DECLARE_GANG_THREE_MISSIONS_PASSED_FLAG ( flag_green_missions_passed ) 


DECLARE_MISSIONS_PASSED_FLAG ( flag_all_missions_passed ) 

DECLARE_FINISH_SCORE ( 5000000 )

DECLARE_TOTAL_MISSIONS ( 22 ) 

DECLARE_TOTAL_SECRETS ( 5 ) 

SAVED_COUNTER kf_passed
SAVED_COUNTER kf_failed

DECLARE_SECRETS_PASSED_FLAG ( kf_passed )

DECLARE_SECRETS_FAILED_FLAG ( kf_failed )

DECLARE_GANG_ONE_MISSIONS_TOTAL ( 7 ) 

DECLARE_GANG_TWO_MISSIONS_TOTAL ( 7 ) 

DECLARE_GANG_THREE_MISSIONS_TOTAL ( 7 )

DECLARE_GANG_ONE_MISSION_FLAG ( p1 , flag_on_yellow_mission )

DECLARE_GANG_TWO_MISSION_FLAG ( p1 , flag_on_red_mission )

DECLARE_GANG_THREE_MISSION_FLAG ( p1 , flag_on_green_mission )


DECLARE_GANG_ONE_DEATH_BASE_BRIEF ( p1 , 4200 )

DECLARE_GANG_TWO_DEATH_BASE_BRIEF ( p1 , 4210 )

DECLARE_GANG_THREE_DEATH_BASE_BRIEF ( p1 , 4220 )


// all missions passed flag


SAVED_COUNTER counter_all_missions_passed = 0

SAVED_COUNTER true = 1 

SAVED_COUNTER false = 0 

COUNTER flag_reached_finish_score = 0


//phone fowards


FORWARD ans_yellow_phone1:

FORWARD ans_red_phone1:
FORWARD ans_red_phone2:

FORWARD ans_green_phone1:





//arrows

ARROW_DATA potato

ARROW_DATA blaow


//intro setup

CHAR_DATA k1 = ( 11.0 , 171.0 , 255.0 )  2  270  PSYCHO
CHAR_DATA k2 = ( 11.0 , 171.5 , 255.0 )  2  270  PSYCHO
CHAR_DATA k3 = ( 11.5 , 171.0 , 255.0 )  2  270  PSYCHO
CHAR_DATA k4 = ( 11.5 , 171.5 , 255.0 )  2  270  PSYCHO
CHAR_DATA k5 = ( 11.0 , 172.0 , 255.0 )  2  270  PSYCHO
CHAR_DATA k6 = ( 11.0 , 172.5 , 255.0 )  2  270  PSYCHO
CHAR_DATA k7 = ( 11.5 , 172.0 , 255.0 )  2  270  PSYCHO
CHAR_DATA k8 = ( 11.5 , 172.5 , 255.0 )  2  270  PSYCHO
CHAR_DATA k9 = ( 11.5 , 173.0 , 255.0 )  2  270  PSYCHO
CHAR_DATA k0 = ( 11.5 , 173.5 , 255.0 )  2  270  PSYCHO



THREAD_TRIGGER boomstart = THREAD_WAIT_FOR_CHAR_IN_AREA_ANY_MEANS  ( p1 , 174.5 , 107.5 , 1.0 , 30.0 , 30.0 , boomdark: )



CHAR_DATA b1 = ( 8.0 , 152.0 , 255.0 )  1  90  CRIMINAL
CHAR_DATA b2 = ( 8.5 , 152.0 , 255.0 )  1  90  CRIMINAL
CHAR_DATA b3 = ( 8.0 , 152.5 , 255.0 )  1  90  CRIMINAL
CHAR_DATA b4 = ( 8.5 , 152.5 , 255.0 )  1  90  CRIMINAL
CHAR_DATA b5 = ( 8.0 , 151.0 , 255.0 )  1  90  CRIMINAL
CHAR_DATA b6 = ( 8.0 , 151.5 , 255.0 )  1  90  CRIMINAL
CHAR_DATA b7 = ( 8.5 , 151.5 , 255.0 )  1  90  CRIMINAL
CHAR_DATA b8 = ( 8.5 , 151.0 , 255.0 )  1  90  CRIMINAL
CHAR_DATA b9 = ( 8.5 , 153.0 , 255.0 )  1  90  CRIMINAL


CAR_DATA boom = ( 5.0 , 161.7 ) -1 45 fiat
CAR_DATA killers = ( 10.5 , 171.5 ) 1 180 van


CHAR_DATA loon_1 = ( 19.5 , 102.5 , 255.0 )  12  270  PSYCHO
CHAR_DATA loon_2 = ( 33.5 , 160.5 , 2.0 )  12  270  PSYCHO
CHAR_DATA loon_3 = ( 208.5 , 72.5 , 2.0 )  12  270  PSYCHO
CHAR_DATA loon_4 = ( 244.5 , 155.5 , 255.0 )  12  270  PSYCHO
CHAR_DATA loon_5 = ( 102.5 , 113.5 , 255.0 )  12  270  PSYCHO



THREAD_TRIGGER startkill = THREAD_WAIT_FOR_CHAR_IN_CAR ( k1 , killers , murder: )


//powerups cars shops etc

GENERATOR pupgen_oozi_1 = ( 89.5 , 105.5 , 255.0 ) 0 collect_01 1800 1800 50
GENERATOR pupgen_suzi_1 = ( 10.5 , 146.5 , 255.0 ) 0 collect_09 1800 1800 50
GENERATOR pupgen_zapo_1 = ( 33.5 , 37.5 , 255.0 ) 0 collect_03 1800 1800 30
GENERATOR pupgen_flam_1 = ( 109.5 , 82.5 , 255.0 ) 0 collect_08 1800 1800 50
GENERATOR pupgen_molo_1 = ( 244.5 , 155.5 , 255.0 ) 0 collect_04 1800 1800 25
GENERATOR pupgen_shot_1 = ( 227.5 , 148.5 , 255.0 ) 0 collect_06 1800 1800 30
GENERATOR pupgen_oozi_2 = ( 10.5 , 210.5 , 255.0 ) 0 collect_01 1800 1800 50
GENERATOR pupgen_gren_1 = ( 112.5 , 129.5 , 255.0 ) 0 collect_05 1800 1800 15
GENERATOR pupgen_rokt_1 = ( 35.5 , 145.5 , 255.0 ) 0 collect_02 1800 1800 20
GENERATOR pupgen_vest_1 = ( 37.5 , 145.5 , 255.0 ) 0 collect_31 1800 1800 
GENERATOR pupgen_hart_1 = ( 42.5 , 145.5 , 255.0 ) 0 collect_30 1800 1800
GENERATOR pupgen_gzat_1 = ( 44.5 , 145.5 , 255.0 ) 0 collect_00 1800 1800 99
GENERATOR pupgen_vest_2 = ( 19.5 , 102.5 , 255.0 ) 0 collect_31 1800 1800
GENERATOR pupgen_hart_2 = ( 21.5 , 102.5 , 255.0 ) 0 collect_30 1800 1800  
GENERATOR pupgen_vest_3 = ( 189.0 , 210.0 , 255.0 ) 0 collect_31 1800 1800
GENERATOR pupgen_hart_3 = ( 189.0 , 208.0 , 255.0 ) 0 collect_30 1800 1800 
GENERATOR pupgen_flam_2 = ( 141.5 , 241.5 , 255.0 ) 0 collect_08 1800 1800 50
GENERATOR pupgen_shot_2 = ( 92.5 , 63.5 , 255.0 ) 0 collect_06 1800 1800 30
GENERATOR pupgen_oozi_3 = ( 130.5 , 25.5 , 255.0 ) 0 collect_01 1800 1800 50
GENERATOR pupgen_suzi_2 = ( 201.5 , 226.5 , 255.0 ) 0 collect_09 1800 1800 50
GENERATOR pupgen_rokt_2 = ( 243.5 , 240.5 , 255.0 ) 0 collect_02 1800 1800 20
GENERATOR pupgen_brib_1 = ( 133.5 , 77.5 , 255.0 ) 0 collect_33 1800 1800 
GENERATOR pupgen_rokt_3 = ( 171.5 , 113.5 , 255.0 ) 0 collect_02 1800 1800 20


CAR_DATA st1 = ( 171.0 , 101.0 ) -1 0 tank
CAR_DATA st2 = ( 173.0 , 101.0 ) -1 0 apc
CAR_DATA st3 = ( 175.0 , 101.0 ) -1 0 gunjeep


OBJ_DATA cross  = ( 4.0 , 165.0 , 255.0 ) 0 BLASTER
OBJ_DATA powerup_1 = ( 3.0 , 164.0 , 255.0 ) 0 COLLECT_00 99 
OBJ_DATA powerup_2 = ( 5.0 , 164.0 , 255.0 ) 0 COLLECT_31 1 

OBJ_DATA bzombshop_1 = ( 205.5 , 123.5 , 2.0 ) 0 car_shop bomb_shop
OBJ_DATA cagunshop_1 = ( 205.5 , 125.5 , 2.0 ) 0 car_shop machinegun_shop
OBJ_DATA sprayshop_1 = ( 205.5 , 127.5 , 2.0 ) 0 car_shop 31
OBJ_DATA minesshop_1 = ( 205.5 , 129.5 , 2.0 ) 0 car_shop mines_shop
OBJ_DATA oileyshop_1 = ( 205.5 , 131.5 , 2.0 ) 0 car_shop oilslick_shop

OBJ_DATA bzombshop_2 = ( 38.5 , 54.0 , 3.0 ) 0 car_shop bomb_shop
OBJ_DATA sprayshop_2 = ( 36.5 , 54.0 , 3.0 ) 0 car_shop 2
OBJ_DATA minesshop_2 = ( 33.5 , 54.0 , 3.0 ) 0 car_shop mines_shop
OBJ_DATA oileyshop_2 = ( 31.5 , 54.0 , 3.0 ) 0 car_shop oilslick_shop



CONVEYOR conveyor_water_crane_in_1 = ( 164.0 , 187.5 , 2.0 ) ( 8.0 , 1.0 ) 1 0
CONVEYOR conveyor_water_crane_out_1 = ( 168.5 , 191.0 , 2.0 ) ( 1.0 , 6.0 ) 0 1

CONVEYOR conveyor_plant_down = ( 170.5 , 121.5 , 3.0 ) ( 1.0 , 15.5 ) 0 4
CONVEYOR conveyor_plant_rite = ( 173.5 , 129.8 , 3.0 ) ( 9.8 , 1.0 ) 4 0
CONVEYOR conveyor_plant_goup = ( 178.5 , 121.5 , 3.0 ) ( 1.2 , 16.0 ) 0 -4
CONVEYOR conveyor_plant_lilu = ( 170.5 , 116.0 , 2.0 ) ( 1.0 , 2.0 ) 0 4

DESTRUCTOR destructor_water_crane_1_in = ( 166.8 , 187.5 , 2.0 )  ( 0.6 , 1.0 )
DESTRUCTOR destructor_water_crane_1_out = ( 168.5 , 193.8 , 2.0 )  ( 1.0 , 0.6 )

CRANE_DATA crusher_water_crane_1 = ( 159.5 , 194.5 ) 200 NO_HOMECRANE FIRST ( 161.5 , 192.5 ) 180
CRANE_DATA crusher_water_crane_2 = ( 163.5 , 190.5 ) 180 crusher_water_crane_1 SECOND ( 163.5 , 187.5 ) 270

CRUSHER crusher_water_1 = ( 161.5 , 192.5 )

GENERATOR generator_water_crusher_crane_powerup = ( 168.5 , 189.5 , 2.0 ) 0 bin 80 80




DECLARE_POWERUP_CARLIST ( spider , graham , xk120 , alfa , fiat , buick , buick , dart , vtype , morris 
, monster , jeffrey , copcar , jeep , stypecab , wbtwin , stingray , edselfbi , stype )

DECLARE_CRANE_POWERUP ( crusher_water_crane_2 , generator_water_crusher_crane_powerup , 165 , 187 , 2 )

 

//random counters kill frenzies and such


COUNTER powerstation = 0
SAVED_COUNTER nopower = 0
SAVED_COUNTER rcount = 0

ONSCREEN_COUNTER kf_counter  
SAVED_COUNTER counter_total
SAVED_COUNTER kf_counter_total
TIMER_DATA kf_timer

OBJ_DATA KF_1_icon = ( 36.5 , 160.5 , 2.0 ) 0 kill_frenzy
PARKED_CAR_DATA KF_2_car = ( 105.5 , 30.5 , 255.0 ) 0 270 firetruk
OBJ_DATA KF_3_icon =  ( 208.5 , 71.5 , 3.0 ) 0 kill_frenzy
OBJ_DATA KF_4_icon =  ( 109.5 , 113.5 , 6.0 ) 0 kill_frenzy
OBJ_DATA KF_5_icon =  ( 159.5 , 235.5 , 2.0 ) 0 kill_frenzy


BONUS kill_frenzy_1
BONUS kill_frenzy_2
BONUS kill_frenzy_3
BONUS kill_frenzy_4
BONUS kill_frenzy_5

FORWARD do_kill_frenzy_1:
FORWARD do_kill_frenzy_2:
FORWARD do_kill_frenzy_3:
FORWARD do_kill_frenzy_4:
FORWARD do_kill_frenzy_5:

DECLARE_DOOR_INFO ( 928 , 935 , 2 )

DOOR_DATA spacecenter_door = DOUBLE ( 159 , 204 , 2 ) ( 159.0 , 205.0 , 2.0 , 2.0 , 4.0 ) BOTTOM 0 ANY_CAR CLOSE_WHEN_CLEAR 0 FLIP_RIGHT NOT_REVERSED



THREAD_TRIGGER thr_kill_frenzy_1 = THREAD_WAIT_FOR_CHAR_IN_AREA ( p1 , 36.5 , 160.5 , 2.0 , 0.2 , 0.2 , do_kill_frenzy_1: )


do_kill_frenzy_1:
	
	START_BASIC_KF_TEMPLATE ( thr_kill_frenzy_1 , 4322 , KF_1_icon , p1 , flame_thrower )
	
	kill_frenzy_1 = START_BONUS_CHECK ( no_zone , 1800 , 20 , 0 , char , not_exclusive , by_flamethrower , none , no_occupation ) 
	
	DO_BASIC_KF_TEMPLATE ( kill_frenzy_1 , kf_timer , 60 , kf_counter , kf_counter_total , 20 , 4322 , p1 , score , 1 ) 

RETURN




THREAD_TRIGGER thr_kill_frenzy_2 = THREAD_WAIT_FOR_CHAR_IN_CAR ( p1 , KF_2_car , do_kill_frenzy_2: )


do_kill_frenzy_2:

	GIVE_WEAPON ( kf_2_car , car_flamethrower )
        SET_CAR_BULLETPROOF  ( kf_2_car , ON )
        SET_CAR_FLAMEPROOF   ( kf_2_car , ON )
        SET_CAR_ROCKETPROOF  ( kf_2_car , ON )
        SET_CAR_NO_COLLIDE   ( kf_2_car )

	START_BASIC_KF_TEMPLATE ( thr_kill_frenzy_2 , 4314 , KF_2_car , p1 , car_flamethrower )
	
//	kill_frenzy_2 = START_BONUS_CHECK ( no_zone , 3600 , 20 , 0 , car , not_exclusive , by_car_flamethrower , firetruk , none ) 
	kill_frenzy_2 = START_BONUS_CHECK ( no_zone , 3600 , 20 , 0 , car , not_exclusive , by_flamethrower , firetruk , none ) 
	
	DO_BASIC_KF_TEMPLATE ( kill_frenzy_2 , kf_timer , 360 , kf_counter , kf_counter_total , 20 , 4314 , p1 , lives , 1 ) 

RETURN

THREAD_TRIGGER thr_kill_frenzy_3 = THREAD_WAIT_FOR_CHAR_IN_AREA ( p1 , 208.5 , 71.5 , 3.0 , 0.2 , 0.2 , do_kill_frenzy_3: )


do_kill_frenzy_3:
	
	START_BASIC_KF_TEMPLATE ( thr_kill_frenzy_3 , 4324 , KF_3_icon , p1 , electro_gun )
	
	kill_frenzy_3 = START_BONUS_CHECK ( no_zone , 1800 , 40 , 0 , char , not_exclusive , by_electro_weapon , none , no_occupation ) 
	
	DO_BASIC_KF_TEMPLATE ( kill_frenzy_3 , kf_timer , 60 , kf_counter , kf_counter_total , 40 , 4324 , p1 , lives , 1 ) 

RETURN



THREAD_TRIGGER thr_kill_frenzy_4 = THREAD_WAIT_FOR_CHAR_IN_AREA ( p1 , 109.5 , 113.5 , 6.0 , 0.2 , 0.2 , do_kill_frenzy_4: )


do_kill_frenzy_4:
	
	START_BASIC_KF_TEMPLATE ( thr_kill_frenzy_4 , 4317 , KF_4_icon , p1 , molotov )
	
	kill_frenzy_4 = START_BONUS_CHECK ( no_zone , 1800 , 20 , 0 , char , not_exclusive , by_molotov , none , no_occupation ) 
	
	DO_BASIC_KF_TEMPLATE ( kill_frenzy_4 , kf_timer , 60 , kf_counter , kf_counter_total , 20 , 4317 , p1 , lives , 1 ) 

RETURN

THREAD_TRIGGER thr_kill_frenzy_5 = THREAD_WAIT_FOR_CHAR_IN_AREA ( p1 , 159.0 , 235.0 , 2.0 , 0.2 , 0.2 , do_kill_frenzy_5: )


do_kill_frenzy_5:
	
	START_BASIC_KF_TEMPLATE ( thr_kill_frenzy_5 , 4321 , KF_5_icon , p1 , rocket_launcher )
	
	kill_frenzy_5 = START_BONUS_CHECK ( no_zone , 1800 , 15 , 0 , car , not_exclusive , by_rocket_launcher , none , none ) 
	
	DO_BASIC_KF_TEMPLATE ( kill_frenzy_5 , kf_timer , 60 , kf_counter , kf_counter_total , 15 , 4321 , p1 , lives , 1 ) 

RETURN






 




COUNTER neverends = 1

LEVELSTART

//intro

SET_AMBIENT_LEVEL ( 1.0 , 30 )


GIVE_WEAPON ( k1 , PISTOL )
GIVE_WEAPON ( k2 , PISTOL )
GIVE_WEAPON ( k3 , PISTOL )
GIVE_WEAPON ( k4 , PISTOL )
GIVE_WEAPON ( k5 , PISTOL )
GIVE_WEAPON ( k6 , PISTOL )
GIVE_WEAPON ( k7 , PISTOL )
GIVE_WEAPON ( k8 , PISTOL )
GIVE_WEAPON ( k9 , PISTOL )
GIVE_WEAPON ( k0 , PISTOL )

GIVE_WEAPON ( b1 , SHOTGUN )
GIVE_WEAPON ( b2 , SHOTGUN )
GIVE_WEAPON ( b3 , SHOTGUN )
GIVE_WEAPON ( b4 , SHOTGUN )
GIVE_WEAPON ( b5 , SHOTGUN )
GIVE_WEAPON ( b6 , SHOTGUN )
GIVE_WEAPON ( b7 , SHOTGUN )
GIVE_WEAPON ( b8 , SHOTGUN )
GIVE_WEAPON ( b9 , SHOTGUN )

ADD_GROUP_TO_CHARACTER ( k1 , 0 )
ADD_EXISTING_CHAR_TO_GROUP  ( k1 , k2 )
ADD_EXISTING_CHAR_TO_GROUP  ( k1 , k3 )
ADD_EXISTING_CHAR_TO_GROUP  ( k1 , k4 )
ADD_EXISTING_CHAR_TO_GROUP  ( k1 , k5 )
ADD_EXISTING_CHAR_TO_GROUP  ( k1 , k6 )
ADD_EXISTING_CHAR_TO_GROUP  ( k1 , k7 )
ADD_EXISTING_CHAR_TO_GROUP  ( k1 , k8 )
ADD_EXISTING_CHAR_TO_GROUP  ( k1 , k9 )
ADD_EXISTING_CHAR_TO_GROUP  ( k1 , k0 )

EXPLODE_SMALL  ( boom )

DISPLAY_BRIEF_NOW ( 1091 )
   

ADD_GROUP_TO_CHARACTER ( p1 , 0 )
ADD_EXISTING_CHAR_TO_GROUP  ( p1 , b2 )
ADD_EXISTING_CHAR_TO_GROUP  ( p1 , b3 )
ADD_EXISTING_CHAR_TO_GROUP  ( p1 , b4 )
ADD_EXISTING_CHAR_TO_GROUP  ( p1 , b5 )
ADD_EXISTING_CHAR_TO_GROUP  ( p1 , b6 )
ADD_EXISTING_CHAR_TO_GROUP  ( p1 , b1 )
ADD_EXISTING_CHAR_TO_GROUP  ( p1 , b7 )
ADD_EXISTING_CHAR_TO_GROUP  ( p1 , b8 )
ADD_EXISTING_CHAR_TO_GROUP  ( p1 , b9 )

ORDER_CHAR_TO_DRIVE_CAR ( k1 , killers )
  






SET_CHAR_OBJECTIVE ( b1 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( b2 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( b3 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( b4 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( b5 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( b6 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( b7 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( b8 , GUARD_AREA )
SET_CHAR_OBJECTIVE ( b9 , GUARD_AREA )

SET_CHAR_THREAT_SEARCH ( b1 , area )
SET_CHAR_THREAT_SEARCH ( b2 , area )
SET_CHAR_THREAT_SEARCH ( b3 , area )
SET_CHAR_THREAT_SEARCH ( b4 , area )
SET_CHAR_THREAT_SEARCH ( b5 , area )
SET_CHAR_THREAT_SEARCH ( b6 , area )
SET_CHAR_THREAT_SEARCH ( b7 , area )
SET_CHAR_THREAT_SEARCH ( b8 , area )
SET_CHAR_THREAT_SEARCH ( b9 , area )

SET_CHAR_THREAT_REACTION  ( b1 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( b2 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( b3 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( b4 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( b5 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( b6 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( b7 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( b8 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( b9 , REACT_AS_NORMAL )

SET_DIR_OF_TV_VANS ( 161.5 , 192.5 )

POINT_ARROW_AT ( blaow , powerstation_1 )

SET_GANG_KILL_REACTION ( gng1 , gng2 , 1 )

SET_GANG_KILL_REACTION ( gng2 , gng3 , 1 )
														
SET_GANG_KILL_REACTION ( gng3 , gng1 , 1 )


//SET flag_on_mission = 1
//SET flag_on_green_mission = 1



//Super elvis zombies, load now to stall intro


SET_CHAR_BRAVERY_LEVEL  ( loon_1 , loony )
SET_CHAR_INVINCIBLE ( loon_1 ,  ON  ) 
GIVE_WEAPON ( loon_1 , FLAME_THROWER )
SET_CHAR_BRAVERY_LEVEL  ( loon_2 , loony )
SET_CHAR_INVINCIBLE ( loon_2 ,  ON  ) 
GIVE_WEAPON ( loon_2 , ELECTRO_GUN )
SET_CHAR_BRAVERY_LEVEL  ( loon_3 , loony )
SET_CHAR_INVINCIBLE ( loon_3 ,  ON  ) 
GIVE_WEAPON ( loon_3 , ROCKET_LAUNCHER )
SET_CHAR_BRAVERY_LEVEL  ( loon_4 , loony )
SET_CHAR_INVINCIBLE ( loon_4 ,  ON  ) 
GIVE_WEAPON ( loon_4 , MOLOTOV )
SET_CHAR_BRAVERY_LEVEL  ( loon_5 , loony )
SET_CHAR_INVINCIBLE ( loon_5 ,  ON  ) 
GIVE_WEAPON ( loon_5 , ELECTRO_BATON )

SET_CHAR_THREAT_SEARCH ( loon_1 , area )
SET_CHAR_THREAT_REACTION  ( loon_1 , REACT_AS_NORMAL )
SET_CHAR_THREAT_SEARCH ( loon_2 , area )
SET_CHAR_THREAT_REACTION  ( loon_2 , REACT_AS_NORMAL )
SET_CHAR_THREAT_SEARCH ( loon_3 , area )
SET_CHAR_THREAT_REACTION  ( loon_3 , REACT_AS_NORMAL )
SET_CHAR_THREAT_SEARCH ( loon_4 , area )
SET_CHAR_THREAT_REACTION  ( loon_4 , REACT_AS_NORMAL )
SET_CHAR_THREAT_SEARCH ( loon_5 , area )
SET_CHAR_THREAT_REACTION  ( loon_5 , REACT_AS_NORMAL )
SET_CHAR_OBJECTIVE ( loon_1 , NO_OBJ )
SET_CHAR_OBJECTIVE ( loon_2 , NO_OBJ )
SET_CHAR_OBJECTIVE ( loon_3 , NO_OBJ )
SET_CHAR_OBJECTIVE ( loon_4 , NO_OBJ )
SET_CHAR_OBJECTIVE ( loon_5 , NO_OBJ )





//part two of intro, people to kill player

murder:
SET_CHAR_OBJECTIVE ( k1 , KILL_CHAR_ANY_MEANS, p1 )
SET_CHAR_OBJECTIVE ( k2 , KILL_CHAR_ANY_MEANS, p1 )
SET_CHAR_OBJECTIVE ( k3 , KILL_CHAR_ANY_MEANS, p1 )
SET_CHAR_OBJECTIVE ( k4 , KILL_CHAR_ANY_MEANS, p1 )
SET_CHAR_OBJECTIVE ( k5 , KILL_CHAR_ANY_MEANS, p1 )
SET_CHAR_OBJECTIVE ( k6 , KILL_CHAR_ANY_MEANS, p1 )
SET_CHAR_OBJECTIVE ( k7 , KILL_CHAR_ANY_MEANS, p1 )
SET_CHAR_OBJECTIVE ( k8 , KILL_CHAR_ANY_MEANS, p1 )
SET_CHAR_OBJECTIVE ( k9 , KILL_CHAR_ANY_MEANS, p1 )
SET_CHAR_OBJECTIVE ( k0 , KILL_CHAR_ANY_MEANS, p1 )

SET_CHAR_DRIVE_AGGRESSION ( k1 , ON ) 

SET_CHAR_THREAT_SEARCH ( k1 , area )
SET_CHAR_THREAT_SEARCH ( k2 , area )
SET_CHAR_THREAT_SEARCH ( k3 , area )
SET_CHAR_THREAT_SEARCH ( k4 , area )
SET_CHAR_THREAT_SEARCH ( k5 , area )
SET_CHAR_THREAT_SEARCH ( k6 , area )
SET_CHAR_THREAT_SEARCH ( k7 , area )
SET_CHAR_THREAT_SEARCH ( k8 , area )
SET_CHAR_THREAT_SEARCH ( k9 , area )
SET_CHAR_THREAT_SEARCH ( k0 , area )

SET_CHAR_THREAT_REACTION  ( k1 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( k2 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( k3 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( k4 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( k5 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( k6 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( k7 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( k8 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( k9 , REACT_AS_NORMAL )
SET_CHAR_THREAT_REACTION  ( k0 , REACT_AS_NORMAL )



//lets turn on the powerups and doors now

SWITCH_GENERATOR ( pupgen_oozi_1 , ON )
SWITCH_GENERATOR ( pupgen_suzi_1 , ON )
SWITCH_GENERATOR ( pupgen_zapo_1 , ON )
SWITCH_GENERATOR ( pupgen_flam_1 , ON )
SWITCH_GENERATOR ( pupgen_molo_1 , ON )
SWITCH_GENERATOR ( pupgen_shot_1 , ON )
SWITCH_GENERATOR ( pupgen_oozi_2 , ON )
SWITCH_GENERATOR ( pupgen_gren_1 , ON )
SWITCH_GENERATOR ( pupgen_rokt_1 , ON )
SWITCH_GENERATOR ( pupgen_vest_1 , ON )
SWITCH_GENERATOR ( pupgen_hart_1 , ON )
SWITCH_GENERATOR ( pupgen_gzat_1 , ON )
SWITCH_GENERATOR ( pupgen_vest_2 , ON )
SWITCH_GENERATOR ( pupgen_hart_2 , ON )
SWITCH_GENERATOR ( pupgen_vest_3 , ON )
SWITCH_GENERATOR ( pupgen_hart_3 , ON )
SWITCH_GENERATOR ( pupgen_flam_2 , ON )
SWITCH_GENERATOR ( pupgen_shot_2 , ON )
SWITCH_GENERATOR ( pupgen_oozi_3 , ON )
SWITCH_GENERATOR ( pupgen_suzi_2 , ON )
SWITCH_GENERATOR ( pupgen_rokt_2 , ON )
SWITCH_GENERATOR ( pupgen_brib_1 , ON )
SWITCH_GENERATOR ( pupgen_rokt_3 , ON )

 MAKE_DOOR_AUTOMATIC ( spacecenter_door )

DISABLE_THREAD_TRIGGER ( startkill )
return



//second mission, or, intro part three

boomdark:

SET_ARROW_COLOUR ( blaow , red )
DISPLAY_BRIEF_NOW ( 1092 )

 

WHILE_EXEC ( powerstation = 0 )


IF ( CHECK_OBJ_MODEL ( powerstation_1 , powergen_dead ) )
            REMOVE_ARROW  ( blaow )
            SET_AMBIENT_LEVEL ( 0.1 , 1400 )
            SET powerstation = 1
            DISABLE_THREAD_TRIGGER ( boomstart )
            DISPLAY_BRIEF_NOW ( 1093 )
            //SET flag_on_mission	= 0
	    //SET flag_on_green_mission = 0
                       
ENDIF  

ENDWHILE

return



//now we wait for player to answer phones


THREAD_TRIGGER thr_green_phone1 = THREAD_WAIT_FOR_ANSWER_PHONE ( p1 , green_phone1 , ans_green_phone1: )  

ans_green_phone1:
DO_EASY_PHONE_TEMPLATE ( 3098 , sc2_gr1.mis , passed_green_phone1 , failed_green_phone1 , flag_on_green_mission , flag_on_red_mission , flag_on_yellow_mission , gng1 , 0 )
RETURN


THREAD_TRIGGER thr_red_phone1 = THREAD_WAIT_FOR_ANSWER_PHONE ( p1 , red_phone1 , ans_red_phone1: )  

ans_red_phone1:
DO_EASY_PHONE_TEMPLATE ( 3098 , sc2_re1.mis , passed_red_phone1 , failed_red_phone1 , flag_on_green_mission , flag_on_red_mission , flag_on_yellow_mission , gng2 , 0 )
RETURN


THREAD_TRIGGER thr_red_phone2 = THREAD_WAIT_FOR_ANSWER_PHONE ( p1 , red_phone2 , ans_red_phone2: )  

ans_red_phone2:
DO_PHONE_TEMPLATE ( 3108 , sc2_rm1.mis , sc2_rm2.mis , passed_red_phone2_m1 , failed_red_phone2_m1 , played_red_phone2_m1 , flag_on_green_mission , flag_on_red_mission , flag_on_yellow_mission , gng2 , 2 )
RETURN




THREAD_TRIGGER thr_yellow_phone1 = THREAD_WAIT_FOR_ANSWER_PHONE ( p1 , yellow_phone1 , ans_yellow_phone1: )  

ans_yellow_phone1:
DO_EASY_PHONE_TEMPLATE ( 3098 , sc2_ye1.mis , passed_yellow_phone1 , failed_yellow_phone1 , flag_on_green_mission , flag_on_red_mission , flag_on_yellow_mission , gng3 , 0 )
RETURN



LEVELEND


