script

; init
	prepare_for_battle

;label_unit  ALLIANCE  ARMY  UNIT


label_unit 0 0 0 	ra ;veles
label_unit 0 0 1	rb ;veles
label_unit 0 0 2 	rc ;veles
label_unit 0 0 3 	rd ;veles
label_unit 0 0 4 	re ;hastati
label_unit 0 0 5 	rf ;hastati
label_unit 0 0 6	rg ;hastati
label_unit 0 0 7	rh ;hastati
label_unit 0 0 8	ri ;princeps
label_unit 0 0 9	rj ;princeps
label_unit 0 0 10	rk ;princeps
label_unit 0 0 11	rl ;princeps
label_unit 0 0 12	rm ;triarii
label_unit 0 0 13	rn ;triarii
label_unit 0 0 14	ro ;triarii
label_unit 0 0 15	rp ;triarii
label_unit 0 0 16	rq ;general
label_unit 0 0 17	rr ;cab ligera
label_unit 0 0 18	rs ;cab edetana
label_unit 0 0 19	rt ;jinetes celtiberos





label_unit 1 0 0	ca ;lanzas turdetanas
label_unit 1 0 1	cb ;lanzas turdetanas
label_unit 1 0 2	cc ;lanzas turdetanas
label_unit 1 0 3	cd ;scut cart
label_unit 1 0 4	ce ;scut cart
label_unit 1 0 5	cf ;pesados
label_unit 1 0 6	cg ;pesados
label_unit 1 0 7	ch ;pesados
label_unit 1 0 8	ci ;pesados
label_unit 1 0 9	cj ;numidas
label_unit 1 0 10	ck ;numida
label_unit 1 0 11	cl ;numida
label_unit 1 0 12	cm ;jinetes edetanos
label_unit 1 0 13	cn ;jinetes edetanos
label_unit 1 0 14	co ;jinetes edetanos
label_unit 1 0 15	cp ;jinete celtibero cartago
label_unit 1 0 16	cq ;jinete celtibero cartago
label_unit 1 0 17	cr ;general
label_unit 1 0 18	cs ;honderos
label_unit 1 0 19	ct ;honderos


	declare_counter battle_start
	declare_counter intro_sequence
	declare_counter player_control

	disable_cursor						;prevent the player clicking
	suspend_unscripted_advice true
	disable_shortcuts true		
	disable_entire_ui
	inhibit_camera_input true

;BATTLE SCRIPT

	while ! I_BattleStarted					; WAIT FOR DEPLOYMENT
	end_while

	ai_active_set off

	camera_default_mode_set tw

	battle_default_camera


	;-----------------------------------------------------------------------------------------------------------

steal_esc_key

	monitor_event EscPressed TrueCondition
		
battle_general_camera
			set_counter battle_start 1

		terminate_monitor
	end_monitor
;-----------------------------------------------------------------------------------------------------------

	
set_counter intro_sequence 1	;	kicks off intro sequence





; *********************************************************************************************
; ***************************************INTRO*************************************************
; *********************************************************************************************


monitor_conditions I_CompareCounter intro_sequence = 1

			;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;   groups



			set_camera_bookmark 0, 428.5, 187.151, -445.358 438.232, 14.451, -445.162
			

	define_unit_group romanos ra rb rc rd re rf rg rh ri rj rk rl rm rn ro rp rq rr rs rt
	
		
	
			camera_restrictions_set off

			hide_ui

; *********************************************************************************************

unit_group_order_relative_move_formed romanos 0 125 run



camera_track_unit rq right 8 3
		
battle_wait 10

		




while I_CompareCounter battle_start = 1		; ESC DUMP
	terminate_monitor
	end_while				; ESC DUMP




battle_wait 20
unit_order_move_relative ci 6 14
unit_order_move_relative ch 3 14



camera_track_unit ci back 5 2

battle_wait 6
camera_track_unit ch back 5 2



battle_wait 6
camera_track_unit cg back 5 2
unit_order_move_relative cg 0 14
unit_order_move_relative cf 0 14

battle_wait 6
camera_track_unit cf back 5 2


battle_wait 6

unit_order_attack_unit rt cj

while I_CompareCounter battle_start = 1		; ESC DUMP
	terminate_monitor
	end_while				; ESC DUMP




camera_track_unit cr back 10 10

battle_wait 5


unit_order_move_relative ci 6 6
unit_order_move_relative ch 3 6
unit_order_move_relative cg 3 6


unit_order_attack_unit rr cm
unit_order_attack_unit rs cn
battle_wait 1
unit_order_attack_unit cj rt
unit_order_attack_unit cm rr
unit_order_attack_unit cn rs



camera_look_at_unit rs
battle_wait 6

camera_look_at_unit rt
battle_wait 6


camera_look_at_unit rq



unit_order_attack_unit ra cs
unit_order_attack_unit rc cs
unit_order_attack_unit rb ct
unit_order_attack_unit rd ct


	
			battle_wait 10

			
		

			while I_CompareCounter battle_start = 1		; ESC DUMP
				terminate_monitor
			end_while					; ESC DUMP






			
			set_music_state battle

		set_counter battle_start 1
			
		terminate_monitor
	end_monitor


; *************************************** FIN INTRO *******************************************








; *********************************************************************************************
;	COMIENZO DE BATALLA
; *********************************************************************************************

	monitor_conditions I_CompareCounter battle_start = 1

			undefine_unit_group cartagineses



			set_counter player_control 1

		terminate_monitor
	end_monitor



; *********************************************************************************************
;	devuelve la interfaz y el control de juego
; *********************************************************************************************

	monitor_conditions I_CompareCounter player_control = 1

			
			;camera_restrictions_set on

			show_ui

			enable_cursor						;prevent the player clicking
			disable_shortcuts false		
			enable_entire_ui
			inhibit_camera_input false

			battle_wait 1

			steal_esc_key off

			camera_default_mode_set user_pref

			pause_battle

			suspend_unscripted_advice false

			battle_wait 30
	ai_active_set on

		terminate_monitor
	end_monitor



	while I_InBattle
	end_while

	end_script