GameMode	invade
GameType	QUEST

	YELLOWBLOCKSONSCREENCOUNTER	Y
	PURPLEBLOCKSONSCREENCOUNTER	P

	LivesRemaining02Counter		Q
Program0123

TEXTBUFFER      LEVS                    


        invade.wbl


ENDBUFFER


Loop INIT
Do

    SetParameter GD_FLOAT    30.0 0 0 0
    SetParameter GAMEDATA    WATERMINLEVEL
    SendMessage  SET_GD_FLOAT

	SetParameter	SCALE1	0.0	0.95	0.0	0.0
	SendMessage	SETBLOCKYSCALE

	SetParameter	NUMLINES	20
	SendMessage	SetStartLines


	SetParameter	BACKDROP	BACKDROP7
	SendMessage	SETBACKDROP


	SetParameter    BUFFERNAME              LEVS
        SetParameter    NUMLINES                30              
        SendMessage     LOADLEVEL

	SendMessage	PAUSELANDLEFT
	SendMessage	PAUSELANDRIGHT
	SetParameter	LIVES	0
	SendMessage	SETLIVES
	SetParameter	MESSAGE_ID	TIMER1
	SetParameter	INTERVAL	500
	SetParameter	REPEAT		TRUE
	SendMessage	CREATETIMER

	SetParameter	MESSAGE_ID	TIMER9
	SetParameter	INTERVAL	1000
	SetParameter	REPEAT		TRUE
	SendMessage	CREATETIMER

	SendMessage	DEACTIVATESCORE

	SetParameter    TEXT    invade.wbw
SendMessage     LOADWEAPONLIST



SendMessage     MUSIC_GROOVE_LOW
	SET T To 0
	SET Z To 1
	SET X To 3
	SET Q To 0
	SET P To 10000
	SET Y To 10000
	SetParameter	Position	0	-199	0	0
	SendMessage	CHANGEWATERHEIGHT
	SendMessage	FIRINGOFF
	SendMessage StartBriefing
	

		GotoLoop BRIEF
		
EndLoop



Loop BRIEF
Do
	SetParameter	Position	0	-199	0	0
	SendMessage	CHANGEWATERHEIGHT


	SetParameter	Colour1		1.0	0.86	0.03	1.0
	SetParameter	Colour2		1.0	0.86	0.03	1.0
	SetParameter	Colour3		1.0	0.86	0.03	1.0
	SetParameter	Colour4		0.0	0.0	0.0	1.0
	SetParameter	Colour5		0.0	0.0	0.0	1.0
	SetParameter	Colour6		0.0	0.0	0.0	1.0
	SetParameter	Scale1		1.3	1.3	1.3	0.0
	SetParameter	Scale2		1.3	1.3	1.3	0.0
	SetParameter	Scale3		1.3	1.3	1.3	0.0
	SetParameter	Scale4		1.3	1.3	1.3	0.0
	SetParameter	Scale5		1.3	1.3	1.3	0.0

	SetParameter	Lifetime	0.0	0.0	0.0	0.0
	SetParameter	Justify		Centre

	SetParameter	Position	0.0	180.0	0.0	0.0
	SetParameter	Text		INVADERS_FROM_MARS
FRE	SetParameter	TEXT		LES_ENVAHISSEURS_DE_MARS
	GER SetParameter	Text		INVASOREN_VOM_MARS
	SPA SetParameter	Text		INVASORES_DE_MARTE
	ITA SetParameter	TEXT		INVASORI_DA_MARTE
	POL SetParameter	TEXT		NAJEŹDŹCY_Z_KOSMOSU




	SendMessage 	CREATETEXT





	SetParameter	Colour1	1.0	1.0	1.0	1.0
	SetParameter	Colour2	1.0	1.0	1.0	1.0
	SetParameter	Colour3	1.0	1.0	1.0	1.0
	SetParameter	Colour4	0.0	0.0	0.0	1.0
	SetParameter	Colour5	0.0	0.0	0.0	1.0
	SetParameter	Colour6	0.0	0.0	0.0	1.0
	SetParameter	Scale1		0.8	0.8	0.8	0.0
	SetParameter	Scale2		0.8	0.8	0.8	0.0
	SetParameter	Scale3		0.8	0.8	0.8	0.0
	SetParameter	Scale4		0.8	0.8	0.8	0.0
	SetParameter	Scale5		0.8	0.8	0.8	0.0

	SetParameter	Lifetime	0.0	0.0	0.0	0.0
	SetParameter	Justify		Centre

	SetParameter	Position	0.0	115.0	0.0	0.0
	SetParameter	Text		Clear_All_Yellow_Blocks
FRE	SetParameter	TEXT		Déblayez_tous_les_blocs_jaunes
	GER SetParameter	Text		Räume_alle_gelben_Steine_ab,
	SPA SetParameter	Text		Destruye_todos_los_bloques_amarillos
	ITA SetParameter	TEXT		Elimina_tutti_i_blocchi_gialli
	POL SetParameter	TEXT		Zniszcz_wszystkie_żółte_cegły,




	SendMessage 	CREATETEXT

	SetParameter	Position	0.0	80.0	0.0	0.0
	SetParameter	Text		Without_Hitting_Any_Purple
FRE	SetParameter	TEXT		sans_toucher_de_violet.
	GER SetParameter	Text_ohne_lila_Steine_zu_treffen.
	SPA SetParameter	Text		sin_tocar_los_morados.
	ITA SetParameter	TEXT	senza_colpire_quelli_viola.
	POL SetParameter	TEXT	oszczędzając_fioletowe.
	
	SendMessage 	CREATETEXT


	SetParameter	Position	0.0	45.0	0.0	0.0
	SetParameter	Text		3_MINUTES
FRE	SetParameter	TEXT		180_secondes
	GER SetParameter	Text 180_Sekunden
	SPA SetParameter	Text		Dispones_de_180_segundos.
	ITA SetParameter	TEXT	Hai_a_disposizione_180_secondi
	POL SetParameter	TEXT	180_sekund






	SendMessage 	CREATETEXT
	
	SetParameter	Colour1		1.0	0.22	0.07	1.0
	SetParameter	Colour2		1.0	0.22	0.07	1.0
	SetParameter	Colour3		1.0	0.22	0.07	1.0
	SetParameter	Colour4		0.0	0.0	0.0	1.0
	SetParameter	Colour5		0.0	0.0	0.0	1.0
	SetParameter	Colour6		0.0	0.0	0.0	1.0
	SetParameter	Scale1		1.0	1.0	1.0	0.0
	SetParameter	Scale2		1.0	1.0	1.0	0.0
	SetParameter	Scale3		1.0	1.0	1.0	0.0
	SetParameter	Scale4		1.0	1.0	1.0	0.0
	SetParameter	Scale5		1.0	1.0	1.0	0.0


	SPA	SetParameter	Scale1		0.8	0.8	0.8	0.0
	SPA	SetParameter	Scale2		0.8	0.8	0.8	0.0
	SPA	SetParameter	Scale3		0.8	0.8	0.8	0.0
	SPA	SetParameter	Scale4		0.8	0.8	0.8	0.0
	SPA	SetParameter	Scale5		0.8	0.8	0.8	0.0

	SetParameter	Position	0.0	-125.0	0.0	0.0
	SetParameter	Text		Press_fire_to_start
FRE	SetParameter	TEXT		Appuyez_sur_Tir_pour_commencer!
	GER SetParameter	Text_Zum_Starten_Feuer_drücken
	SPA SetParameter	Text		Pulsa_el_disparo_para_empezar
	ITA SetParameter	TEXT	Premi_fuoco_per_cominciare
	POL SetParameter	TEXT	Naciśnij_strzał



	SendMessage 	CREATETEXT











	

	SendMessage 	CREATETEXT
	OnMessage FIREPRESSED
	Do
SendMessage	MUSIC_GROOVE_MED_LOW


		SendMessage EndBriefing
		SendMessage FIRINGON	
		GotoLoop MAIN
		
	EndResponse
EndLoop




Loop MAIN
Do
	
	SetParameter	Position	0	-199	0	0
	SendMessage	CHANGEWATERHEIGHT
	If Q BecomesEqualTo -1
	Then

		SendMessage LOSECONDITION
		GotoLoop CHECK


	EndIf
SetParameter	Scale1		1.0	1.0	1.0	1.0
	SetParameter	Scale2		1.0	1.0	1.0	1.0
	SetParameter	Scale3		1.0	1.0	1.0	1.0
	SetParameter	Scale4		1.0	1.0	1.0	1.0
	SetParameter	Scale5		1.0	1.0	1.0	1.0
	SetParameter	FRAME		3
	SetParameter	Lifetime	0.0	0.0	0.0	0.0
	SetParameter	Position	180.0	210.0	0.0	0.0
	SendMessage	CREATEICON

	SetParameter	Scale1		0.8	0.8	0.8	0.8
	SetParameter	Scale2		0.8	0.8	0.8	0.8
	SetParameter	Scale3		0.8	0.8	0.8	0.8
	SetParameter	Scale4		0.8	0.8	0.8	0.8
	SetParameter	Scale5		0.8	0.8	0.8	0.8



	OnMessage TIMER9
	Do
		SetParameter	Position	0	-199	0	0
	SendMessage	CHANGEWATERHEIGHT

		SetParameter	Velocity	0.0	0.0	0.0	0.0


		If Z IsGreaterThan 60
		Then
			Subtract 60 From Z
			Add 1 to X
			
		EndIf

		Subtract 1 from Z

		SetParameter	Lifetime	0.0	0.0	1.0	0.0
		SetParameter	Position	240.0	210.0	0.0	0.0






		If Z IsLessThan 0
		Then
			Subtract 1 from X

			Set Z To 59
			
		EndIf

		If X IsEqualTo 0
		Then

			If Z IsLessThan 11
			Then

				SetParameter	Colour1		1.0	0.22	0.07	1.0
				SetParameter	Colour2		1.0	0.22	0.07	1.0
				SetParameter	Colour3		1.0	0.22	0.07	1.0
			
			EndIf

		EndIf

		If Z IsLessThan 10
		Then
	SetParameter	Scale1		0.8	0.8	0.8	0.8
	SetParameter	Scale2		0.8	0.8	0.8	0.8
	SetParameter	Scale3		0.8	0.8	0.8	0.8
	SetParameter	Scale4		0.8	0.8	0.8	0.8
	SetParameter	Scale5		0.8	0.8	0.8	0.8
			SetParameter	Text		0
			SetParameter	Position	240.0	210.0	0.0	0.0
			SendMessage	CREATETEXT
			SetParameter	Position	255.0	210.0	0.0	0.0
		EndIf

		If Z IsEqualTo 60 
		Then
	SetParameter	Scale1		0.8	0.8	0.8	0.8
	SetParameter	Scale2		0.8	0.8	0.8	0.8
	SetParameter	Scale3		0.8	0.8	0.8	0.8
	SetParameter	Scale4		0.8	0.8	0.8	0.8
	SetParameter	Scale5		0.8	0.8	0.8	0.8
			Set Z TO 00
			ConvertToText   Z
			SendMessage	CREATETEXT
			
			Set Z To 60

		EndIf
		


		If X IsEqualTo -1
		Then

			Set Z To 0

			SetParameter	Scale1		0.8	0.8	0.8	0.0
			SetParameter	Scale2		0.8	0.8	0.8	0.0
			SetParameter	Scale3		0.8	0.8	0.8	0.0
			SetParameter	Scale4		0.8	0.8	0.8	0.0
			SetParameter	Scale5		0.8	0.8	0.8	0.0
			SetParameter	TEXT	0
			SetParameter	Position	240.0	210.0	0.0	0.0
			SendMessage	CREATETEXT

			SetParameter	Scale1		0.8	0.8	0.8	0.0
			SetParameter	Scale2		0.8	0.8	0.8	0.0
			SetParameter	Scale3		0.8	0.8	0.8	0.0
			SetParameter	Scale4		0.8	0.8	0.8	0.0
			SetParameter	Scale5		0.8	0.8	0.8	0.0
			SetParameter	TEXT	0
			SetParameter	Position	255.0	210.0	0.0	0.0
			SendMessage	CREATETEXT

			Set X To 0


	
			GotoLoop END
		EndIf


		If Z IsEqualTo 0
		Then

			If X IsEqualTo 0
			Then

		
				GotoLoop END
			EndIf		

		EndIf


		If Z IsLessThan 60
		Then
	SetParameter	Scale1		0.8	0.8	0.8	0.0
	SetParameter	Scale2		0.8	0.8	0.8	0.0
	SetParameter	Scale3		0.8	0.8	0.8	0.0
	SetParameter	Scale4		0.8	0.8	0.8	0.0
	SetParameter	Scale5		0.8	0.8	0.8	0.0
			ConvertToText   Z
			SendMessage	CREATETEXT

		EndIf

		SetParameter	Scale1		0.8	0.8	0.8	0.0
		SetParameter	Scale2		0.8	0.8	0.8	0.0
		SetParameter	Scale3		0.8	0.8	0.8	0.0
		SetParameter	Scale4		0.8	0.8	0.8	0.0
		SetParameter	Scale5		0.8	0.8	0.8	0.0
		SetParameter	Lifetime	0.0	0.0	1.0	0.0

		ConvertToText	X
		SetParameter	Position	215.0	210.0	0.0	0.0
		SendMessage	CREATETEXT

	EndResponse






If P ISLESSTHAN 20
	Then
SetParameter	Position	0.0	0.0	0.0	0.0
SetParameter	Scale1		8.0	8.0	8.0	1.0
SetParameter	Scale2		5.0	5.0	5.0	1.0
SetParameter	Scale4		3.0	3.0	3.0	1.0
SetParameter	Colour1		1.0	0.22	0.07	1.0
SetParameter	Colour2		1.0	0.22	0.07	1.0
SetParameter	Colour3		1.0	0.22	0.07	1.0
SetParameter	Colour4		0.0	0.0	0.0	1.0
SetParameter	Colour5		0.0	0.0	0.0	1.0
SetParameter	Colour6		0.0	0.0	0.0	1.0
SetParameter	Lifetime	0.2	0.7	3.2	4.2
SetParameter	Text		FAILED!
FRE SetParameter	TEXT	ÉCHEC!
GER SetParameter	Text	VERLOREN!
SPA SetParameter	Text	ˇFALLASTE!
ITA SetParameter	TEXT	HAI_FALLITO!
POL SetParameter	TEXT	Klęska


	

SendMessage	CREATETEXT
		SendMessage	LOSECONDITION
		GotoLoop END2
		EndIf	
		

		If Y BECOMESLESSTHAN 20
		Then
		SendMessage     MUSIC_GROOVE_HIGH


		EndIf




		If Y ISLESSTHAN 1
		Then
SetParameter	Position	0.0 	0.0	0.0	0.0
SetParameter	Lifetime	0.2	0.7	3.2	4.2
SetParameter	Scale1		0.4	0.4	0.4	0.0
SetParameter	Scale2		1.4	1.4	1.4	0.0
SetParameter	Scale3		3.4	3.4	3.4	0.0
SetParameter	Scale4		2.0	2.0	2.0	0.0
SetParameter	Scale5		1.8	1.8	1.8	0.0
SetParameter	Colour1		0.18	0.9	0.1	1.0
SetParameter	Colour2		0.18	0.9	0.1	1.0
SetParameter	Colour3		0.18	0.9	0.1	1.0
SetParameter	Colour4		1.0	1.0	1.0	1.0
SetParameter	Colour5		0.0	0.0	0.0	1.0
SetParameter	Colour6		0.0	0.0	0.0	1.0
SetParameter	Text	SUCCESS!
FRE SetParameter	TEXT	RÉUSSI!
GER SetParameter	Text	GESCHAFFT!
SPA SetParameter	Text	ˇLO_CONSEGUISTE!
ITA SetParameter	TEXT	HAI_VINTO!
POL SetParameter	TEXT	Sukces




SendMessage	CREATETEXT
		SetParameter	TEXT	jdrace
		SendMessage	SETNEXTGAMEMODE
		SendMessage	LOSECONDITION

		GotoLoop END2
		EndIf
	
		

	
EndLoop


Loop CHECK
Do

	
	
EndLoop



Loop END2
Do

	
	
EndLoop





Loop END
Do
		SetParameter	Position	0.0	0.0	0.0	0.0
				SetParameter	Scale1		8.0	8.0	8.0	1.0
				SetParameter	Scale2		5.0	5.0	5.0	1.0
				SetParameter	Scale4		3.0	3.0	3.0	1.0
				SetParameter	Colour1		1.0	0.22	0.07	1.0
				SetParameter	Colour2		1.0	0.22	0.07	1.0
				SetParameter	Colour3		1.0	0.22	0.07	1.0
				SetParameter	Colour4		0.0	0.0	0.0	1.0
				SetParameter	Colour5		0.0	0.0	0.0	1.0
				SetParameter	Colour6		0.0	0.0	0.0	1.0
				SetParameter	Lifetime	0.2	0.7	3.2	4.2
				SetParameter	Text		TIME'S_UP!
FRE				SetParameter	TEXT		TEMPS_ÉCOULÉ!
				GER SetParameter	Text	ENDE
				SPA SetParameter	Text	ˇTIEMPO!
				ITA SetParameter	TEXT	TEMPO_ESAURITO!
POL SetParameter	TEXT	Czas_upłynął




				SendMessage	CREATETEXT

				SendMessage 	LOSECONDITION
				GotoLoop CHECK

EndLoop










EndFile
