
;----------------------START CO-OP----------------
;@@@@@@@@@@@@@@@@@@@@START CO-OP@@@@@@@@@@@@@@@@
;##################START CO-OP################
;----------------START CO-OP----------------
;		\/	   \/

if never() then
	fogtype(1) 
	skyspeed(111)
	fogdist(260)
	tod(1533)
	set(v33,0)		
endif

;-----------------timer-------------------

if past(10) and never() then
;	consol("Defend the City Center for 5 Min")
endif

if past(15) and never() then
;	consol("Repeat: Defend the City Center for 5 Min")
endif

if past(20) and never() then ;---for Puma Wave I
	set(v3,1)
;	consol("Repeat: Defend the City Center for 5 Min")
;	consol("Do Not leave the City Center before the 5 Min timer")
endif

if past(60) and never() then
	killssn(3944)
;	consol("4 Min Left")
endif

if past(120) and never() then
	killssn(3945)
;	consol("3 Min Left")
	overcast(60,120)
endif

if past(180) and never() then
	killssn(3946)
;	consol("2 Min Left")
endif

if past(240) and never() then
	killssn(3947)
;	consol("1 Min Left")
endif

if past(300) and never() then
	rain(100,600)
;	consol("Proceed to the marketplace")
endif

if past(420) and never() then
	overcast(90,480)
endif

if past(560) and never() then
	removessn(3543)
	removessn(3542)	
endif

if past(1200) and never() then
	rain(10,420)
	overcast(10,600)	
endif

;-------Blue team holds the top mission fail timer ---------

;if event(8) and not past(299) and past(60) and never() then
;	killssn(3674)	;----wac to med communication 
;endif
	
if past(300) and never() then
	killssn(3731)	;----wac to med communication 
endif	


;------------ Co Op AI -----------
;-----/\miracle man sessions/\----


;	   ---- BTR ----
if ssnloc(3331,03) and never() then
;	consol("BTR moving in")
	GTowp(13,40)
	GTowp(14,40)
	ssn2ssn(3505,3331)
	ssn2ssn(3506,3330)
	ssn2ssn(3507,3331)
	ssn2ssn(3508,3330)		
endif

; ----- attack progression ----- Phase I ----

if ssnloc(3493,03) and elapse(3) and eq(v33,0) then
	SSNtoWP(3493,41)
endif	
if ssnloc(3493,04) and elapse(3) and eq(v33,0) then
	SSNtoWP(3493,70)
endif

if ssnloc(3494,03) and elapse(3) and eq(v33,0) then
	SSNtoWP(3494,41)
endif	
if ssnloc(3494,04) and elapse(3) and eq(v33,0) then
	SSNtoWP(3494,70)
endif

if ssnloc(3495,03) and elapse(3) and eq(v33,0) then
	SSNtoWP(3495,41)
endif	
if ssnloc(3495,04) and elapse(3) and eq(v33,0) then
	SSNtoWP(3495,70)
endif

if ssnloc(3496,03) and elapse(3) and eq(v33,0) then
	SSNtoWP(3496,41)
endif	
if ssnloc(3496,04) and elapse(3) and eq(v33,0) then
	SSNtoWP(3496,70)
endif

if ssnloc(3497,03) and elapse(3) and eq(v33,0) then
	SSNtoWP(3497,41)
endif	
if ssnloc(3497,04) and elapse(3) and eq(v33,0) then
	SSNtoWP(3497,70)
endif

if ssnloc(3498,03) and elapse(3) and eq(v33,0) then
	SSNtoWP(3498,41)
endif	
if ssnloc(3498,04) and elapse(3) and eq(v33,0) then
	SSNtoWP(3498,70)
endif

if ssnloc(3499,03) and elapse(3) and eq(v33,0) then
	SSNtoWP(3499,41)
endif	
if ssnloc(3499,04) and elapse(3) and eq(v33,0) then
	SSNtoWP(3499,70)
endif

;------ attack progression ----- Phase II ---- #Relentless Assault#--

if ssnloc(3493,07) and elapse(0) and eq(v33,0) then
	SSNtoWP(3493,17)
endif	

if ssnloc(3494,07) and elapse(3) and eq(v33,0) then
	SSNtoWP(3494,17)
endif	

if ssnloc(3495,07) and elapse(6) and eq(v33,0) then
	SSNtoWP(3495,17)
endif	

if ssnloc(3496,07) and elapse(1) and eq(v33,0) then
	SSNtoWP(3496,17)
endif
	
if ssnloc(3497,07) and elapse(2) and eq(v33,0) then
	SSNtoWP(3497,17)
endif
	
if ssnloc(3498,07) and elapse(8) and eq(v33,0) then
	SSNtoWP(3498,17)
endif
		
if ssnloc(3499,07) and elapse(5) and eq(v33,0) then
	SSNtoWP(3499,17)
endif

;-----------PUMA WAVE I--------------"oh shit"

if eq(v3,1) or elapse(60) and never() then
;	consol("They Are coming")
	ssnhp(3449,9000) 
	ssnhp(3450,9000) 
	ssntowp(3449,30)
	ssntowp(3450,31)
	inc(v3)	
endif

;-----PUMA WAVE I DROP--------------"heh heh heh"

if ssnloc(3449,20) or ssnarea3D(3449,20) or event(6) then
endif


if previous() and never() then
;	consol("Puma Wave I Land")
	ssnhp(3450,9000)
	ssnhp(3449,9000)
	killssn(3512)  
	killssn(3511)
endif

if chain(5) then
	set(v4,1)
	ssnhp(3449,9000)
	ssnhp(3450,9000)
	if eq(v4,1) and never() then
		ssnhp(3449,9000)
		ssnhp(3450,9000)
		GtoWP(21,44)
;		consol("Puma Corps I Attack South")	
		set(v4,2)
		if eq(v4,2) and never() then
			Gtowp(20,45)
			inc(v4)
;			consol("Puma Corps I Attack North")
			ssnhp(3449,9000)
			ssnhp(3450,9000)
		endif
	endif
endif

if chain(100) and never() then
	Gtowp(30,63)
endif

;------random attack boats--------
if past(220) and random(21) and never() then
;	Gtowp(55,55)
	Gtowp(10,63)
endif

;if chain(1) and never() then	
;	Groupatt(12,600)
;	Groupmin(12,600)
;endif


;@__$$__$$__$$__$$__$$__$$__Marketplace__$$__$$__$$__$$__$$__$$__@

;--------anti co-op breaking, drug against shitty------

if not past(600) and event(14) and never() then
	killssn(3858) ;----wac to med communication
endif

;--------Med communication ------
	
if event(16) or past(300) then
endif
if previous()and never() then
	gtowp(15,19)
endif


;--------pseudo dynamic Marketplace AI--------3848 V6
if ssnloc(3848,51) then
	ssntowp(3848,19)
	SSNmax(3848,200)
	SSNmin(3848,200) 
	SSNatt(3848,200)
endif

if ssnloc(3848,4) and never() then
	SSNmax(3848,120)
	SSNmin(3848,3) 
	SSNatt(3848,250)
endif

if ssnloc(3848,55) then
	set(v6,1)
endif

if eq(v6,1) then
	doseq
		ssntowp(3848,21)
	next
		ssntowp(3848,20)
	enddo
	set(v6,0)	
endif	

;--------pseudo dynamic Marketplace AI--------3849 V7
if ssnloc(3849,51) then
	ssntowp(3849,19)
	SSNmax(3849,200)
	SSNmin(3849,200) 
	SSNatt(3849,200)
endif

if ssnloc(3849,4) and never() then
	SSNmax(3849,120)
	SSNmin(3849,3) 
	SSNatt(3849,250)
endif

if ssnloc(3849,55) then
	set(v7,1)
endif

if eq(v7,1) then
	doseq
		ssntowp(3849,20)
	next
		ssntowp(3849,21)
	enddo
	set(v7,0)	
endif	

;--------pseudo dynamic Marketplace AI--------3850 V8
if ssnloc(3850,51) then
	ssntowp(3850,19)
	SSNmax(3850,200)
	SSNmin(3850,200) 
	SSNatt(3850,200)
endif

if ssnloc(3850,4) and never() then
	SSNmax(3850,120)
	SSNmin(3850,3) 
	SSNatt(3850,250)
endif

if ssnloc(3850,55) then
	set(v8,1)
endif

if eq(v8,1) then
	doseq
		ssntowp(3850,21)
	next
		ssntowp(3850,20)
	enddo
	set(v8,0)	
endif

;--------pseudo dynamic Marketplace AI--------3851 V9
if ssnloc(3851,51) then
	ssntowp(3851,19)
	SSNmax(3851,200)
	SSNmin(3851,200) 
	SSNatt(3851,200)
endif

if ssnloc(3851,4) and never() then
	SSNmax(3851,120)
	SSNmin(3851,3) 
	SSNatt(3851,250)
endif

if ssnloc(3851,55) then
	set(v9,1)
endif

if eq(v9,1) then
	doseq
		ssntowp(3851,20)
	next
		ssntowp(3851,21)
	enddo
	set(v9,0)	
endif

;--------pseudo dynamic Marketplace AI--------3852 V10
if ssnloc(3852,51) then
	ssntowp(3852,19)
	SSNmax(3852,200)
	SSNmin(3852,200) 
	SSNatt(3852,200)
endif

if ssnloc(3852,4) and never() then
	SSNmax(3852,120)
	SSNmin(3852,3) 
	SSNatt(3852,250)
endif

if ssnloc(3852,55) then
	set(v10,1)
endif

if eq(v10,1) then
	doseq
		ssntowp(3852,21)
	next
		ssntowp(3852,20)
	enddo
	set(v10,0)	
endif

;--------pseudo dynamic Marketplace AI--------3853 V11
if ssnloc(3853,51) then
	ssntowp(3853,19)
	SSNmax(3853,200)
	SSNmin(3853,200) 
	SSNatt(3853,200)
endif

if ssnloc(3853,4) and never() then
	SSNmax(3853,120)
	SSNmin(3853,3) 
	SSNatt(3853,250)
endif

if ssnloc(3853,55) then
	set(v11,1)
endif

if eq(v11,1) then
	doseq
		ssntowp(3853,20)
	next
		ssntowp(3853,21)
	enddo
	set(v11,0)	
endif


;-------- came the tanks----------grp47


if ssndead(4743) or past(312) then
endif

if previous() and never() then
	//gtowp(47,47)
	set(v3,2)
	killssn(4744)
endif

;-------------OG Group gets reused------------

if ssnloc(3493,09) and event(17) then
	set(V33,1)	
	killssn(3493)
	SSNtoWP(3493,40)
endif	

if ssnloc(3494,09) and event(17) then
	set(V33,1)
	killssn(3494)
	SSNtoWP(3494,40)
endif	

if ssnloc(3495,09) and event(17) then
	set(V33,1)
	killssn(3495)
	SSNtoWP(3495,40)
endif
	
if ssnloc(3496,09) and event(17) then
	set(V33,1)
	killssn(3496)
	SSNtoWP(3496,40)
endif
	
if ssnloc(3497,09) and event(17) then
	set(V33,1)
	killssn(3497)
	SSNtoWP(3497,40)
endif
	
if ssnloc(3498,09) and event(17) then
	set(V33,1)
	killssn(3498)
	SSNtoWP(3498,40)
endif
	
if ssnloc(3499,09) and event(17) then
	set(V33,1)
	killssn(3499)
	SSNtoWP(3499,40)
endif

;-------------PUMA WAVE II--------------

If eq(v3,2) and past(300) and never() then
;	consol("Puma Suprise Wave II")
	ssntowp(3453,32)
	ssntowp(3455,33)
endif	

	
;-
;---
;------
;--------
;BlaK3n-d --
;----------------Marketplace fire------------

if ssndead(2210) or ssndead(2211) or ssndead(2190) and never() then
	fx2tgt(effect_fxFireWD,30)
	fx2tgt(effect_fxFireWD,31)
	fx2tgt(effect_fxFireWD,32)
	inc(v1)	
endif 	 

if ssndead(2191) or ssndead(2189) and never() then
	fx2tgt(effect_fxFireWD,33)
	fx2tgt(effect_fxFireWD,34)
	fx2tgt(effect_fxFireWD,35)
	inc(v1)
endif 	 

if eq(v1,2) and never() then
;	consol("youve started a fire")
	fx2tgt(effect_fxFireWD,36) ; left awning ground
	fx2tgt(effect_fxFireWD,37) ; mid awning ground
	fx2tgt(effect_fxFireWD,38) ; right awning ground
	fx2tgt(effect_fxFireWD,39) ; planter right
	fx2tgt(effect_fxFireWD,60) ; planter left
endif


if chain(0) and never() then
	fx2tgt(effect_fxFireWD,61) ;	left awning roof
	fx2tgt(effect_fxFireWD,62) ;	mid awning roof	
	fx2tgt(effect_fxFireWD,63) ;	right awning roof
	fx2tgt(effect_fxFireWD,64) ;	palmtree right elevated
	fx2tgt(effect_fxFireWD,65) ;	palmtree left elevated
endif


;********************************************************************
;------------------MASSIVE ATTACK------------------------------------
;^^^^^^^^^^^^^^^^^ MASSIVE ATTACK ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

;-------------MarketPlace Thin out Initiative------

if past(600) or ssndead(4211) and never() then
	killssn(3848)
endif

if chain(2) and never() then
	removessn(3848) 
endif

if past(620) or ssndead(4211) and never() then
	killssn(3849)
endif

if chain(2) and never() then
	removessn(3849) 
endif

if past(640) or ssndead(4211) and never() then
	killssn(3850)
endif

if chain(2) and never() then
	removessn(3850) 
endif

if past(660) and ssndead(4211) and never() then
	killssn(3851)
endif

if chain(2) and never() then
	removessn(3851) 
endif

if past(680) and ssndead(4211) and never() then
	killssn(3852)
endif

if chain(2) and never() then
	removessn(3852) 
endif

if past(700) and ssndead(4211) and never() then
	killssn(3853)
endif

if chain(2) and never() then
	removessn(3853) 
endif

;----------Safety-------errr....ummmm, kluge ?

//if past(720) then
//	kill(11)
//	kill(47)
//	kill(31)
//endif

;-----------the start of it all ---------

if ssndead(4211) and never() then  ;----ssn 4211 is killed by med
	set(v99,1)
;	consol("the start of it all")
endif

if chain(5) then
	remove(11)
	remove(47)
	remove(31)
endif

;!---------Heavy Infantry!!Heavy Infantry---------!
;--------pseudo dynamic Tank Depot AI--------4074 V20

if ssnloc(4074,86) and eq(v99,1) and never() then
	ssnhp(4074,450)
	set(v20,1)
	SSNmax(4074,200)
	SSNmin(4074,200) 
	SSNatt(4074,200)
endif

if eq(v20,1) then
	doseq
		ssntowp(4074,104)
	next
		ssntowp(4074,105)
	next
		ssntowp(4074,106)
	enddo
	set(v20,0)	
endif

if ssnloc(4074,87) and never() then
	SSNmax(4074,120)
	SSNmin(4074,3) 
	SSNatt(4074,70)
endif

;--------pseudo dynamic Tank Depot AI--------4075 V21
if ssnloc(4075,86) and eq(v99,1) and never() then
	ssnhp(4075,450)
	set(v21,1)
	SSNmax(4075,200)
	SSNmin(4075,200) 
	SSNatt(4075,200)
endif

if eq(v21,1) then
	doseq
		ssntowp(4075,105)
	next
		ssntowp(4075,104)
	next
		ssntowp(4075,106)
	enddo
	set(v21,0)	
endif

if ssnloc(4075,87) and never() then
	SSNmax(4075,120)
	SSNmin(4075,3) 
	SSNatt(4075,50)
endif

;--------pseudo dynamic Tank Depot AI--------4076 V22
if ssnloc(4076,86) and eq(v99,1) and never() then
	ssnhp(4076,450)
	set(v22,1)
	SSNmax(4076,200)
	SSNmin(4076,200) 
	SSNatt(4076,200)
endif

if eq(v22,1) then
	doseq
		ssntowp(4076,106)
	next
		ssntowp(4076,104)
	next
		ssntowp(4076,105)
	enddo
	set(v22,0)	
endif

if ssnloc(4076,87) and never() then
	SSNmax(4076,120)
	SSNmin(4076,3) 
	SSNatt(4076,100)
endif

;--------pseudo dynamic Tank Depot AI--------4077 V23
if ssnloc(4077,86) and eq(v99,1) and never() then
	ssnhp(4077,450)
	set(v23,1)
	SSNmax(4077,200)
	SSNmin(4077,200) 
	SSNatt(4077,200)
endif

if eq(v23,1) then
	doseq
		ssntowp(4077,104)
	next
		ssntowp(4077,105)
	next
		ssntowp(4077,106)
	enddo
	set(v23,0)	
endif

if ssnloc(4077,87) and never() then
	SSNmax(4077,120)
	SSNmin(4077,3) 
	SSNatt(4077,100)
endif

;--------pseudo dynamic Tank Depot AI--------4078 V24
if ssnloc(4078,86) and eq(v99,1) and never() then
	ssnhp(4078,450)
	set(v24,1)
	SSNmax(4078,200)
	SSNmin(4078,200) 
	SSNatt(4078,200)
endif

if eq(v24,1) then
	doseq
		ssntowp(4078,106)
	next
		ssntowp(4078,105)
	next
		ssntowp(4078,104)
	enddo
	set(v24,0)	
endif

if ssnloc(4078,87) and never() then
	SSNmax(4078,120)
	SSNmin(4078,3) 
	SSNatt(4078,100)
endif


;!---------Support Infantry!!Support Infantry---------!
;--------pseudo dynamic Tank Depot AI--------4063 V40
if ssnloc(4063,85) and eq(v99,1) and never() then
	set(v40,1)
	SSNmax(4063,200)
	SSNmin(4063,200) 
	SSNatt(4063,200)
endif

if eq(v40,1) then
	doseq
		ssntowp(4063,114)
	next
		ssntowp(4063,115)
	next
		ssntowp(4063,116)
	enddo
	set(v40,0)	
endif

if ssnloc(4063,87) and never() then
	SSNmax(4063,120)
	SSNmin(4063,3) 
	SSNatt(4063,100)
endif

;--------pseudo dynamic Tank Depot AI--------4064 V41
if ssnloc(4064,85) and eq(v99,1) and never() then
	set(v41,1)
	SSNmax(4064,200)
	SSNmin(4064,200) 
	SSNatt(4064,200)
endif

if eq(v41,1) then
	doseq
		ssntowp(4064,115)
	next
		ssntowp(4064,116)
	next
		ssntowp(4064,114)
	enddo
	set(v41,0)	
endif

if ssnloc(4064,87) and never() then
	SSNmax(4064,120)
	SSNmin(4064,3) 
	SSNatt(4064,100)
endif

;--------pseudo dynamic Tank Depot AI--------4065 V42
if ssnloc(4065,85) and eq(v99,1) and never() then
	set(v42,1)
	SSNmax(4065,200)
	SSNmin(4065,200) 
	SSNatt(4065,200)
endif

if eq(v42,1) then
	doseq
		ssntowp(4065,114)
	next
		ssntowp(4065,116)
	next
		ssntowp(4065,115)
	enddo
	set(v42,0)	
endif

if ssnloc(4065,87) and never() then
	SSNmax(4065,120)
	SSNmin(4065,3) 
	SSNatt(4065,100)
endif

;--------pseudo dynamic Tank Depot AI--------4066 V43
if ssnloc(4066,85) and eq(v99,1) and never() then
	set(v43,1)
	SSNmax(4066,200)
	SSNmin(4066,200) 
	SSNatt(4066,200)
endif

if eq(v43,1) then
	doseq
		ssntowp(4066,116)
	next
		ssntowp(4066,114)
	next
		ssntowp(4066,115)
	enddo
	set(v43,0)	
endif

if ssnloc(4066,87) and never() then
	SSNmax(4066,120)
	SSNmin(4066,3) 
	SSNatt(4066,100)
endif


;--------THE $HIT--------------

if ssndead(4223) and never() and past(600) then
	ssntowp(4050,99)
endif

if chain(3) and never() then
	ssntowp(4006,99)
	killssn(4036)
	killssn(4037)
	removessn(3493) 	
	removessn(3494) 	
	removessn(3495) 
	removessn(3496) 	
	removessn(3497) 	
	removessn(3498) 		
	removessn(3499) 
endif

if chain(5) and never() then
	ssntowp(4005,99)
endif

if chain(5) or ssndead(4050) and never() then
	ssntowp(4004,99)
endif

if chain(5) and never() then
	ssntowp(4003,99)
endif

if ssnloc(4050,87) and never() then
	ssntowp(4050,101)
endif

if ssnloc(4006,87) and never() then
	ssntowp(4006,102)
endif




;*_*-----------Vaporizing Funtime-------------*_*

;-----------Fuel Trucks---------------V60s
if ssndead(3688) and past(600) and never() then
	set(V60,1)
endif
if eq(v60,1) and chain(10) and never() then		//was elapse(5) which did not make sense.
	removessn(3688)
endif

if ssndead(3683) and past(600) and never() then
	set(v61,1)
endif
if eq(v61,1) and chain(10) and never() then		//was elapse(5) which did not make sense.
	removessn(3683)
endif

if ssndead(3867) and past(600) and never() then
	set(v62,1)
endif
if eq(v62,1) and chain(10) and never() then		//was elapse(5) which did not make sense.
	removessn(3867)
endif

if ssndead(3865) and past(600) and never() then
	set(v63,1)
endif
if eq(v63,1) and chain(10) and never() then		//was elapse(5) which did not make sense.
	removessn(3865)
endif

if ssndead(3866) and past(600) and never() then
	set(v64,1)
endif
if eq(v64,1) and chain(10) and never() then		//was elapse(5) which did not make sense.
	removessn(3866)
endif

;------------------------
;----------Freaking Tanks----------			// And never() was added to all below.

if ssndead(4003) and past(600) and never() then
	set(V65,1)
endif
if eq(v65,1) and chain(10) and never() then		//was elapse(5) which did not make sense.
	removessn(4003)
endif

if ssndead(4004) and past(600) and never() then
	set(V66,1)
endif
if eq(v66,1) and chain(10) and never() then		//was elapse(5) which did not make sense.
	removessn(4004)
endif

if ssndead(4005) and past(600) and never() then
	set(V67,1)
endif
if eq(v67,1) and chain(10) and never() then		//was elapse(5) which did not make sense.
	removessn(4005)
endif

if ssndead(4006) and past(600) and never() then
	set(V68,1)
endif
if eq(v68,1) and chain(10) and never() then		//was elapse(5) which did not make sense.
	removessn(4006)
endif

if ssndead(4050) and past(600) and never() then
	set(V69,1)
endif
if eq(v69,1) and chain(10) and never() then		//was elapse(5) which did not make sense.
	removessn(4050)
endif

///***** BEGIN ANDY ADDED ******///

//if ssndead(3920) and past(600) and never() then
//endif
//if chain(10) and never() then
//	removessn(3920)
//endif
//
//if ssndead(3921) and past(600) and never() then
//endif
//if chain(10) and never() then
//	removessn(3921)
//endif
//
//if ssndead(3998) and past(600) and never() then
//endif
//if chain(10) and never() then
//	removessn(3998)
//endif
//
//if ssndead(4073) and past(600) and never() then
//endif
//if chain(10) and never() then
//	removessn(4073)
//endif
//
//Stop Zodiacs from respawning
//if ssndead(3697) and never() then
//endif
//if chain(5) and never() then
//	removessn(3697)
//endif
//
//if ssndead(3696) and never() then
//endif
//if chain(5) and never() then
//	removessn(3696)
//endif
//
//if ssndead(3695) and never() then
//endif
//if chain(5) and never() then
//	removessn(3695)
//endif

////STOP RESPAWNING AT PSP
if ssndead(4742) and never() then
	groupSpawn(15, 0)
endif
if ssndead(4742) and never() then
	groupSpawn(15, 0)
endif

//STOP RESPAWNING IN BEGINING AFTER GOAL 1 COMPLETED
if never() and past(300) then
	groupspawn(58, 0)
endif

//STOP RESPAWNING at End of mission
if never() and event(29) then
	groupspawn(26, 0)
endif


//Trigger Effect on Targets
if ssndead(3874) or ssndead(3875) or ssndead(3682) then
	killssn(3869)
endif
if chain(1) and never() then
	killssn(3868)
	killssn(3870)
endif
if chain(1) and never() then
	killssn(3675)
	killssn(4045)
endif

if ssndead(4045) or ssndead(3675) then
endif
if chain(1) and never() then
	killssn(3868)
	killssn(3870)
endif
if chain(1) and never() then
	killssn(3869)
endif
if chain(1) and never() then
	killssn(3874) 
	killssn(3875)
	killssn(3682)
endif
	
if ssndead(3963) or ssndead(3958) then
	killssn(3958) 
	killssn(3963)	
endif

if ssndead(3962) or ssndead(3961) then
		killssn(3961) 
		killssn(3962)	
endif

///***** END ANDY ADDED ******///

;---------------marketplace tanks n btrs----------

if ssndead(3920) and past(420) then
	set(V70,1)
endif
if eq(v70,1) and chain(5) then
	removessn(3920)
endif

if ssndead(3921) and past(420) then
	set(V71,1)
endif
if eq(v71,1) and chain(5) then
	removessn(3921)
endif

if ssndead(3330) and past(420) then
	set(V72,1)
endif
if eq(v72,1) and chain(5) then
	removessn(3330)
endif

if ssndead(3331) and past(420) then
	set(V73,1)
endif
if eq(v73,1) and chain(5) then
	removessn(3331)
endif


;----------------TANK Safety ----------------

if ssndead(4052) and ssndead(4053) and ssndead(4046) and never() then
	killssn(4003)
endif

if ssndead(4054) and ssndead(4055) and ssndead(4049) and never() then
	killssn(4004)
endif

if ssndead(4056) and ssndead(4057) and ssndead(4047) and never() then
	killssn(4006)
endif

if ssndead(4048) and ssndead(4058) and ssndead(4059) and never() then
	killssn(4005)
endif

if ssndead(4051) and ssndead(4060) and ssndead(4061) and never() then
	killssn(4050)
endif



































