GameMode	ufo
GameType	QUEST
	RedComboCounter			R
	YellowComboCounter		Y
	GreenComboCounter		G
	OrangeComboCounter		F
	PurpleComboCounter		P
	LANDBLOCKSDESTROYEDCOUNTER	A
	WaterHeightCounter		H
	LivesRemaining02Counter		Q



Program0123

TEXTBUFFER      LEVS                   

        ufo.wbl


ENDBUFFER


Loop INIT
Do
	SendMessage	DEACTIVATESCORE

	SetParameter	BACKDROP	BACKDROP3
	SendMessage	SETBACKDROP

	SetParameter	NUMLINES	2
	SendMessage	SetStartLines

	SetParameter    BUFFERNAME              LEVS
        SetParameter    NUMLINES                30              
        SendMessage     LOADLEVEL
	SetParameter	INTERVAL	9970
	SendMessage	SetLandSpeed
	SetParameter	LIVES	1
	SendMessage	SETLIVES
	SetParameter	MESSAGE_ID	TIMER1
	SetParameter	INTERVAL	500
	SetParameter	REPEAT		TRUE
	SendMessage	CREATETIMER
	SetParameter	MESSAGE_ID	TIMER2
	SetParameter	INTERVAL	3500
	SetParameter	REPEAT		FALSE
	SendMessage	CREATETIMER
SetParameter    TEXT    ufo.wbw
SendMessage     LOADWEAPONLIST
SendMessage     MUSIC_GROOVE_LOW

	SET S To 0
	SET T To 0
	SET B To 0
	SET R To 0
	SET Z To 0
	SET Y To 0
	SET G To 0
	SET X To 0
	SET Z To 120
	SET M To 0
	SendMessage	FIRINGOFF
	SendMessage StartBriefing

	SetParameter Position	0.0	-175	0.0	0.0
	SendMessage ChangeWaterHeight

	SendMessage	QUAKENO

	

	GotoLoop BRIEF

EndLoop




Loop BRIEF
Do





	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		CRAZY_ALIENS
FRE	SetParameter	TEXT		EXTRATERRESTRES_FOUS
ITA	SetParameter	TEXT		ALIENI_PAZZI
SPA	SetParameter	TEXT		ALIENS_CHIFLADOS
GER	SetParameter	TEXT		VERRÜCKTE_ALIENS
POL	SetParameter	TEXT		Zwariowani_kosmici

	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		2_Mins_to_destroy_10_UFOs
FRE	SetParameter	TEXT		2_mn_pour_détruire_10_OVNI
ITA	SetParameter	Text		2_minuti_per_distruggere_10_UFO
SPA	SetParameter	TEXT		Tienes_dos_minutos_
GER	SetParameter	TEXT		2_min_um_10_UFOs_zu_zerstören
POL	SetParameter	TEXT		2_minuty_na_zniszczenie_15_UFO


	SendMessage 	CREATETEXT

	SetParameter	Position	0.0	80.0	0.0	0.0
ENG	SetParameter	Text		Hit_the_coloured_blocks
FRE	SetParameter	TEXT		Détruisez_les_blocs_de_couleur
SPA	SetParameter	TEXT		para_destruir_10_ovnis.	
GER	SetParameter	TEXT		__
ITA	SetParameter	TEXT		__	
POL	SetParameter	TEXT		__
	SendMessage 	CREATETEXT

	SetParameter	Position	0.0	45.0	0.0	0.0
ENG	SetParameter	Text		to_disable_them
FRE	SetParameter	TEXT		__
GER	SetParameter	TEXT		__
ITA	SetParameter	TEXT		__		
SPA	SetParameter	TEXT		__
POL	SetParameter	TEXT		__
	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

	SetParameter	Position	0.0	-125.0	0.0	0.0
	SetParameter	Text		Press_fire_to_start
FRE	SetParameter	Text		Appuyez_sur_Tir_pour_commencer.
ITA	SetParameter	TEXT		Premi_fuoco_per_cominciare
GER	SetParameter	TEXT		Zum_Starten_Feuer_drücken
POL	SetParameter	TEXT		Naciœnij_"Strza³"


	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

	SPA SetParameter	Text	Pulsa_el_disparo_para_empezar
	SendMessage 	CREATETEXT

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



	
	SetParameter	INTERVAL	700
	SendMessage	SetLandSpeed

		OnMessage FIREPRESSED
	Do
SendMessage	MUSIC_GROOVE_MED_LOW


		SendMessage EndBriefing
		SendMessage FIRINGON	
	SetParameter	MESSAGE_ID	TIMER9
	SetParameter	INTERVAL	1000
	SetParameter	REPEAT		TRUE
	SendMessage	CREATETIMER



		GotoLoop MAIN

	EndResponse

EndLoop



Loop MAIN
Do

	SetParameter Position	0.0	-175	0.0	0.0
	SendMessage ChangeWaterHeight
	If Q BecomesEqualTo -1
	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!
ITA	SetParameter	TEXT		HAI_FALLITO!
SPA	SetParameter	TEXT		¡FALLASTE!
GER	SetParameter	TEXT		VERLOREN!
POL	SetParameter	TEXT		Pora¿ka


	SendMessage	CREATETEXT
		SendMessage LOSECONDITION

	EndIf


	GosubLoop CHECK
	
	GosubLoop YELLOW
	GosubLoop GREEN
	GosubLoop SCORE






	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	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	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

			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 TIME
		EndIf


		If Z IsEqualTo 0
		Then

			If X IsEqualTo 0
			Then


				GotoLoop TIME
			EndIf		

		EndIf


		If Z IsLessThan 60
		Then

			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 M BECOMESEQUALTO 60
	Then
				SetParameter	POSITION	19	4	0	0
				SetParameter	BLOCKCOLOUR	CRATE
				SetParameter	CRATECONTENTS	CRATE_SHIELD
				SendMessage	SPAWNINBLOCK


	Endif

	If R IsGreaterThan 2
	Then
		SetParameter	Position	0.0	0.0	0.0	0.0
		SetParameter	Velocity	0.0	0.01	0.0	0.0
		SetParameter	Gravity		0.0	0.0	0.0	0.0
		SetParameter	Scale1		0.5	0.5	0.5	0.0
		SetParameter	Scale2		1.5	1.5	1.5	0.0
	
		SetParameter	Colour1		1.0	1.0	1.0	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	Lifetime	0.1	0.5	1.0	1.5
		SetParameter	Justify		Centre
		SetParameter	Text		Got_ONE
FRE		SetParameter	Text		Touché!
ITA		SetParameter	TEXT		Fuori_UNO
SPA		SetParameter	TEXT		Uno_menos
GER		SetParameter	TEXT		Du_hast_eins
POL	SetParameter	TEXT		Masz_jednego

	
		SetParameter	Colour2		1.0	0.0	0.0	1.0
		SetParameter	Colour3		1.0	0.0	0.0	1.0
		SetParameter	Position	0.0	0.0	0.0	0.0
		SendMessage	CREATETEXT
		SET B To 0
		ADD 1 To S	

	Endif
	
	
	OnMessage REDCOMBODONE
	Do
		Set R To 0	
	
	EndResponse

	If M IsEqualTo -1
	Then
		
		SendMessage LOSECONDITION
	
	EndIf

EndLoop



Loop GREEN
Do

	If G IsGreaterThan 2
	Then
		SetParameter	Position	0.0	0.0	0.0	0.0
		SetParameter	Velocity	0.0	0.01	0.0	0.0
		SetParameter	Gravity		0.0	0.0	0.0	0.0
		SetParameter	Scale1		0.5	0.5	0.5	0.0
		SetParameter	Scale2		1.5	1.5	1.5	0.0
	
		SetParameter	Colour1		1.0	1.0	1.0	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	Lifetime	0.1	0.5	1.0	1.5
		SetParameter	Justify		Centre
		SetParameter	Text		Got_ONE
FRE		SetParameter	Text		Touché!
ITA		SetParameter	TEXT		Fuori_UNO
SPA		SetParameter	TEXT		Uno_menos
GER		SetParameter	TEXT		Du_hast_eins
POL	SetParameter	TEXT		Masz_jednego
	
		SetParameter	Colour2		0.0	1.0	0.0	1.0
		SetParameter	Colour3		0.0	1.0	0.0	1.0
		SetParameter	Position	0.0	0.0	0.0	0.0
		SendMessage	CREATETEXT
		SET B To 0
		ADD 1 To S	
	
	Endif
		


	OnMessage GREENCOMBODONE
	Do
		Set G To 0	
	
	EndResponse

EndLoop



Loop YELLOW
Do


	If Y IsGreaterThan 2
	Then

		SetParameter	Position	0.0	0.0	0.0	0.0
		SetParameter	Velocity	0.0	0.01	0.0	0.0
		SetParameter	Gravity		0.0	0.0	0.0	0.0
		SetParameter	Scale1		0.5	0.5	0.5	0.0
		SetParameter	Scale2		1.5	1.5	1.5	0.0
	
		SetParameter	Colour1		1.0	1.0	1.0	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	Lifetime	0.1	0.5	1.0	1.5
		SetParameter	Justify		Centre
		SetParameter	Text		Got_ONE
FRE		SetParameter	Text		Touché!
ITA		SetParameter	TEXT		Fuori_UNO
SPA		SetParameter	TEXT		Uno_menos
GER		SetParameter	TEXT		Du_hast_eins
POL	SetParameter	TEXT		Masz_jednego	
		SetParameter	Colour2		1.0	1.0	0.0	1.0
		SetParameter	Colour3		1.0	1.0	0.0	1.0
		SetParameter	Position	0.0	0.0	0.0	0.0
		SendMessage	CREATETEXT
		SET B To 0
		ADD 1 To S
		
	Endif
		
	
	
	OnMessage YELLOWCOMBODONE
	Do
		Set Y To 0	
	EndResponse

EndLoop	



Loop WIN
Do
	
EndLoop


Loop SPEED
Do
	SetParameter	INTERVAL	650
	SendMessage	SetLandSpeed
	SendMessage     MUSIC_GROOVE_MED
	SetParameter	Text		Watch_out!
FRE	SetParameter	Text		Attention!
ITA	SetParameter	TEXT		Attento!
SPA	SetParameter	TEXT		¡Cuidado!
GER		SetParameter	TEXT	Vorsicht!
POL	SetParameter	TEXT		Uwa¿aj!


		
	SetParameter	Lifetime	0.1	0.5	2.2	1.0
	SetParameter	Colour2		1.0	0.0	0.0	1.0
	SetParameter	Colour3		1.0	0.0	0.0	1.0
	SetParameter	Position	0.0	-40.0	0.0	0.0
	SendMessage	CREATETEXT
	
EndLoop



Loop SPEED2
Do
	SetParameter	INTERVAL	560
	SendMessage	SetLandSpeed
	SendMessage     MUSIC_GROOVE_HIGH
	SetParameter	Text		Crazy_Aliens!
FRE	SetParameter	Text		EXTRATERRESTRES_FOUS!
ITA	SetParameter	TEXT		Alieni_pazzi!
SPA	SetParameter	TEXT		¡Aliens_chiflados!
GER		SetParameter	TEXT	Verrückte_Aliens!
POL	SetParameter	TEXT		Zwariowani_kosmici!

		
	SetParameter	Lifetime	0.1	0.5	2.2	1.0
	SetParameter	Colour2		1.0	0.0	0.0	1.0
	SetParameter	Colour3		1.0	0.0	0.0	1.0
	SetParameter	Position	0.0	-40.0	0.0	0.0
	SendMessage	CREATETEXT
	
EndLoop


Loop CHECK
Do
	OnMessage TIMER1
	Do
		ADD 1 To T
	EndResponse


		SetParameter Position	0.0	-175	0.0	0.0
	SendMessage ChangeWaterHeight
	
	
EndLoop

Loop SCORE
Do
	If S BECOMESGREATERTHANOREQUALTO 4
	Then
				
		GosubLoop SPEED	
	EndIf

	If S BECOMESGREATERTHANOREQUALTO 6
	Then
				
		GosubLoop SPEED2	
	EndIf

		
	If S BECOMESGREATERTHANOREQUALTO 7
	Then
ENG		SetParameter	Text		3_More_needed!
FRE		SetParameter	Text		ENCORE_3_!
SPA		SetParameter	TEXT		¡Faltan_3!
GER		SetParameter	TEXT	Nur_noch_3_mehr!
POL	SetParameter	TEXT		___

		SetParameter	Lifetime	0.1	0.5	1.0	1.5
		SetParameter	Colour2		1.0	0.0	0.0	1.0
		SetParameter	Colour3		1.0	0.0	0.0	1.0
		SetParameter	Position	0.0	50.0	0.0	0.0
		SendMessage	CREATETEXT	
				
	EndIf


	If S BECOMESGREATERTHANOREQUALTO 9
	Then
		SetParameter	Text		One_More!
FRE		SetParameter	Text		Un_de_plus!
ITA		SetParameter	TEXT		Ancora_uno!
SPA		SetParameter	TEXT		¡Falta_1!
GER		SetParameter	TEXT	Noch_einen!
POL	SetParameter	TEXT		Jeszcze_jeden!
		SetParameter	Lifetime	0.1	0.5	1.0	1.5
		SetParameter	Colour2		1.0	0.0	0.0	1.0
		SetParameter	Colour3		1.0	0.0	0.0	1.0
		SetParameter	Position	0.0	50.0	0.0	0.0
		SendMessage	CREATETEXT	
				
	EndIf




	If S ISGREATERTHANOREQUALTO 10
	Then
		SetParameter	INTERVAL	999900
		SendMessage	SetLandSpeed	
			
			SetParameter HIDDEN_ID 5
			SendMessage UNLOCKGAMEMODE
			

		SendMessage	WINCONDITION	



				
		GotoLoop WIN	

	EndIf
EndLoop




Loop TIME
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É!
ITA				SetParameter	TEXT		TEMPO_ESAURITO!
SPA				SetParameter	TEXT		¡TIEMPO!
GER			SetParameter	TEXT		ZEIT_ABGELAUFEN!
POL	SetParameter	TEXT		Koniec!
				SendMessage	CREATETEXT

				SendMessage 	LOSECONDITION

GOTOLOOP WIN

EndLoop












EndFile
