Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;= H2MT Headlong+AI by Kills Alone ======================================================
- ;= GLOBALS ==============================================================================
- (global short g_jetfuel 100)
- (global boolean g_jetpack_enabled false)
- (global boolean g_pelican_unit_dump false)
- (global boolean g_phantom_unit_dump false)
- (global vehicle g_gausshog none)
- (global vehicle g_guntower none)
- (global vehicle g_hev_frank none)
- (global vehicle g_hev_syn none)
- (global vehicle g_hev_trigger none)
- (global vehicle g_pelican none)
- (global vehicle g_phantom none)
- (global vehicle g_scorpion none)
- (global vehicle g_warthog none)
- (global vehicle g_wraith none)
- (global short g_randomh1 0)
- (global short g_random_alien 0)
- (global short g_random_alien_alpha 0)
- (global short g_random_alien_beta 0)
- (global short g_random_spartan 0)
- (global ai g_spartan_name none)
- (script static unit player0
- (unit (list_get (players) 0)))
- (script static unit player1
- (unit (list_get (players) 1)))
- (script static short player_count
- (list_count (players)))
- ;= COMMAND SCRIPTS ======================================================================
- (script command_script cs_csquad_drop_bugger_advance0
- ; Allow the Buggers to move and attack
- (cs_ignore_obstacles false)
- (cs_vehicle_boost true)
- ; (cs_enable_moving true)
- (cs_enable_targeting true)
- ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
- (cs_force_combat_status 4)
- ; (cs_go_to csquad_drop_bugger_advance0/p0 1)
- ; (cs_face true csquad_drop_bugger_advance0/p4FACE)
- )
- (script command_script cs_csquad_drop_ranger_advance0
- ; Allow the Rangers to move and attack
- (cs_ignore_obstacles false)
- (cs_vehicle_boost true)
- (cs_enable_moving true)
- (cs_enable_targeting true)
- ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
- (cs_force_combat_status 4)
- ; (cs_go_to csquad_drop_ranger_advance0/p0 1)
- (cs_face true csquad_drop_ranger_advance0/p4FACE)
- )
- (script command_script cs_csquad_drop_wraith0_advance0
- ; Allow the Wraith to move and attack
- (cs_ignore_obstacles true)
- (cs_vehicle_boost true)
- (cs_enable_moving true)
- (cs_enable_targeting true)
- ; (cs_vehicle_speed 0.50)
- ; (sleep 300)
- ; (begin_random
- ; (begin (cs_go_to csquad_drop_wraith0_advance0/p0 1) (sleep (random_range 10 20)))
- ; (begin (cs_go_to csquad_drop_wraith0_advance0/p1 1) (sleep (random_range 10 20)))
- ; (begin (sleep 1) (sleep (random_range 10 20)))
- ; )
- ; (cs_go_to csquad_drop_wraith0_advance0/p0 1)
- ; (cs_go_to csquad_drop_wraith0_advance0/p1 1)
- ; Look at the player
- ; (cs_look_player true)
- ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
- ; (cs_force_combat_status 4)
- )
- (script command_script cs_csquad_ghost0_advance0
- ; (cs_abort_on_damage true)
- ; (cs_abort_on_combat_status ai_combat_status_clear_los)
- (cs_vehicle_boost true)
- (cs_enable_targeting true)
- (cs_go_to csquad_ghost0_advance0/p0 1)
- (cs_go_to csquad_ghost0_advance0/p1 1)
- (cs_go_to csquad_ghost0_advance0/p2 1)
- (cs_go_to csquad_ghost0_advance0/p3 1)
- (cs_go_to csquad_ghost0_advance0/p4 1)
- (cs_go_to csquad_ghost0_advance0/p5 1)
- (cs_go_to csquad_ghost0_advance0/p6 1)
- (cs_enable_moving true)
- ; (ai_prefer_target g_gausshog 1)
- ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
- (cs_force_combat_status 4)
- ; (cs_shoot true)
- (cs_shoot true g_scorpion)
- )
- (script command_script cs_csquad_ghost2_advance0
- ; Allow the Ghost to move and attack
- (cs_ignore_obstacles true)
- (cs_vehicle_boost true)
- (cs_enable_moving true)
- (cs_enable_targeting true)
- (cs_go_to csquad_ghost2_advance0/p0 1)
- (cs_go_to csquad_ghost2_advance0/p1 1)
- (cs_go_to csquad_ghost2_advance0/p2 1)
- ; Rotate the Ghost
- (cs_face true csquad_ghost2_advance0/p3FACE)
- ; (cs_face_object true scarab)
- (sleep 30)
- ; Look at the player
- ; (cs_look_player true)
- (cs_ignore_obstacles false)
- ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
- (cs_force_combat_status 4)
- ; (cs_vehicle_speed 0.50)
- ; (cs_vehicle_boost false)
- ; (cs_go_to csquad_ghost2_advance0/p3 1)
- ; (sleep 100)
- ; (cs_vehicle_speed 1)
- )
- (script command_script cs_csquad_banshee1_advance0
- ; Allow the Banshee to move and attack
- (cs_ignore_obstacles false)
- (cs_vehicle_boost true)
- (cs_enable_moving true)
- (cs_enable_targeting true)
- (cs_go_to csquad_banshee1_advance0/p0 1)
- (cs_go_to csquad_banshee1_advance0/p1 1)
- ; (cs_go_to csquad_banshee1_advance0/p2 1)
- ; Rotate the Banshee
- (cs_face true csquad_banshee1_advance0/p3FACE)
- ; (cs_face_object true scarab)
- (sleep 30)
- ; Look at the player
- ; (cs_look_player true)
- (cs_ignore_obstacles false)
- ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
- (cs_force_combat_status 4)
- ; (cs_vehicle_speed 0.50)
- ; (cs_vehicle_boost false)
- ; (cs_go_to csquad_banshee1_advance0/p3 1)
- ; (sleep 100)
- ; (cs_vehicle_speed 1)
- )
- (script command_script cs_csquad_phantom0_advance0
- (cs_ignore_obstacles true)
- (cs_enable_pathfinding_failsafe true)
- (sleep_until (= g_phantom_unit_dump 1) 1)
- (print "Phantom is coming to take a dump!")
- ; (ai_place csquad_phantom0)
- ; (cs_vehicle_speed 0.5)
- ; (cs_vehicle_boost true)
- (cs_enable_targeting true)
- (cs_fly_to csquad_phantom0_advance0/p0 1)
- (sleep 1)
- (cs_fly_to csquad_phantom0_advance0/p1 1)
- (sleep 1)
- (cs_fly_to csquad_phantom0_advance0/p2 1)
- (sleep 30)
- ; Rotate the Phantom
- (cs_face true csquad_phantom0_advance0/p3FACE)
- ; (cs_face_object true scarab)
- (sleep 30)
- (cs_fly_to csquad_phantom0_advance0/p4 1)
- (sleep 100)
- ; Drop some Covenant
- (print "Phantom takes a dump all over you!")
- (ai_vehicle_exit csquad_phantom0/passenger0)
- (sleep 20)
- (ai_vehicle_exit csquad_phantom0/passenger1)
- (sleep 20)
- (ai_vehicle_exit csquad_phantom0/passenger2)
- (sleep 20)
- (ai_vehicle_exit csquad_phantom0/passenger3)
- ; (ai_vehicle_exit ai_current_actor)
- ; (sleep 60)
- ; Turn the Phantom and head towards the exit
- (cs_face false csquad_phantom0_advance0/p3FACE)
- (cs_fly_to csquad_phantom0_advance0/p1 1)
- (sleep 1)
- ; (cs_vehicle_speed 1)
- (cs_fly_to csquad_phantom0_advance0/p0 1)
- ; (cs_enable_moving true)
- ; (ai_erase ai_current_squad)
- (object_destroy (ai_vehicle_get ai_current_actor))
- (set g_phantom_unit_dump 0)
- )
- (script command_script cs_hsquad_pelican0_advance0
- (cs_ignore_obstacles true)
- (cs_enable_pathfinding_failsafe true)
- (sleep_until (= g_pelican_unit_dump 1) 1)
- (print "Pelican is coming to take a dump!")
- ; (ai_place hsquad_pelican0)
- (cs_vehicle_speed 0.5)
- ; (cs_vehicle_boost true)
- (cs_enable_targeting true)
- (cs_fly_to hsquad_pelican0_advance0/p0 1)
- (sleep 1)
- (cs_fly_to hsquad_pelican0_advance0/p1 1)
- (sleep 1)
- (cs_fly_to hsquad_pelican0_advance0/p2 1)
- (sleep 30)
- ; Rotate the Pelican
- (cs_face true hsquad_pelican0_advance0/p3FACE)
- ; (cs_face_object true scarab)
- (sleep 30)
- (cs_fly_to hsquad_pelican0_advance0/p4 1)
- (sleep 100)
- ; (unit_open (ai_vehicle_get ai_current_actor))
- ; Drop some Marines
- (print "Pelican takes a dump all over you!")
- (ai_vehicle_exit hsquad_pelican0/passenger0)
- (ai_vehicle_exit hsquad_pelican0/passenger1)
- ; (ai_vehicle_exit ai_current_actor)
- ; (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_l01")
- ; (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_l02")
- ; (sleep (random_range 0 30)
- ; (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_l03")
- ; (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_l04")
- ; (sleep (random_range 0 30)
- ; (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_l05")
- ; (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_r01")
- ; (sleep (random_range 0 30)
- ; (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_r02")
- ; (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_r03")
- ; (sleep (random_range 0 30)
- ; (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_r04")
- ; (vehicle_unload (ai_vehicle_get ai_current_actor) "pelican_p_r05")
- ; (ai_migrate "hsquad_pelican0" "hsquad")
- (sleep 60)
- ; (unit_close (ai_vehicle_get ai_current_actor)
- ; Turn the Pelican and head towards the exit
- (cs_face false hsquad_pelican0_advance0/p3FACE)
- (cs_fly_to hsquad_pelican0_advance0/p1 1)
- (sleep 1)
- (cs_vehicle_speed 1)
- (cs_fly_to hsquad_pelican0_advance0/p0 1)
- ; (cs_enable_moving true)
- ; (ai_erase ai_current_squad)
- (object_destroy (ai_vehicle_get ai_current_actor))
- (set g_pelican_unit_dump 0)
- )
- (script command_script cs_hsquad_warthog1_advance0
- ; Allow the Warthog to move and attack
- (cs_ignore_obstacles true)
- (cs_enable_moving true)
- (cs_enable_targeting true)
- (cs_go_to hsquad_warthog1_advance0/p0 1)
- (cs_go_to hsquad_warthog1_advance0/p1 1)
- (cs_go_to hsquad_warthog1_advance0/p2 1)
- (cs_go_to hsquad_warthog1_advance0/p3 1)
- (cs_go_to hsquad_warthog1_advance0/p4 1)
- (cs_go_to hsquad_warthog1_advance0/p5 1)
- (cs_go_to hsquad_warthog1_advance0/p6 1)
- (cs_go_to hsquad_warthog1_advance0/p7 1)
- (cs_go_to hsquad_warthog1_advance0/p8 1)
- (cs_go_to hsquad_warthog1_advance0/p9 1)
- (cs_go_to hsquad_warthog1_advance0/p10 1)
- (cs_go_to hsquad_warthog1_advance0/p11 1)
- (cs_go_to hsquad_warthog1_advance0/p12 1)
- (cs_go_to hsquad_warthog1_advance0/p13 1)
- (cs_go_to hsquad_warthog1_advance0/p14 1)
- (cs_go_to hsquad_warthog1_advance0/p15 1)
- (cs_go_to hsquad_warthog1_advance0/p16 1)
- (cs_go_to hsquad_warthog1_advance0/p17 1)
- (cs_go_to hsquad_warthog1_advance0/p18 1)
- (cs_go_to hsquad_warthog1_advance0/p19 1)
- ; Force the actor's combat status (0= no override, 1= asleep, 2=idle, 3= alert, 4= active)
- (cs_force_combat_status 4)
- (sleep 500)
- (ai_vehicle_exit hsquad_warthog1)
- ; Regroup with Hsquad
- (ai_migrate "hsquad_warthog1/gunner" "hsquad")
- ; Orders Driver to get into the Wraith (if alive)
- (ai_vehicle_enter hsquad_warthog1/driver g_wraith "wraith_d")
- (sleep 100)
- (effect_new_on_object_marker "effects\generic\explosions_ground\fire_explosion_no_damage" g_warthog "explosion")
- (object_destroy g_warthog)
- )
- (script command_script cs_hsquad_deploy_turret0
- (cs_enable_pathfinding_failsafe true)
- ; (cs_deploy_turret hsquad_deploy_turret0/p0)
- (begin_random
- (begin (cs_deploy_turret hsquad_deploy_turret0/p0) (sleep (random_range 10 20)))
- (begin (cs_deploy_turret hsquad_deploy_turret0/p1) (sleep (random_range 10 20)))
- (begin (cs_deploy_turret hsquad_deploy_turret0/p2) (sleep (random_range 10 20)))
- (begin (cs_deploy_turret hsquad_deploy_turret0/p3) (sleep (random_range 10 20)))
- )
- )
- (script command_script cs_hsquad_scorpion_advance0
- ; Allow the Scorpion to move and attack
- (cs_ignore_obstacles true)
- (cs_enable_moving true)
- (cs_enable_targeting true)
- (sleep 300)
- (cs_go_to hsquad_scorpion_advance0/p0 1)
- (cs_go_to hsquad_scorpion_advance0/p1 1)
- (cs_go_to hsquad_scorpion_advance0/p2 1)
- (cs_go_to hsquad_scorpion_advance0/p3 1)
- (cs_go_to hsquad_scorpion_advance0/p4 1)
- (cs_go_to hsquad_scorpion_advance0/p5 1)
- (cs_go_to hsquad_scorpion_advance0/p6 1)
- (cs_go_to hsquad_scorpion_advance0/p7 1)
- (sleep 300)
- (cs_go_to hsquad_scorpion_advance0/p4 1)
- (cs_go_to hsquad_scorpion_advance0/p8 1)
- ; Turn the Scorpion
- (cs_face false hsquad_scorpion_advance0/pFACE)
- )
- ;*
- (script command_script cs_ai_player_style
- ; Allow the AI Player(s) to move and attack
- (cs_ignore_obstacles true)
- (cs_enable_moving true)
- (cs_enable_targeting true)
- (cs_set_style assaulting)
- )
- *;
- ;= KILL VOLUMES =========================================================================
- ; Kill Player 1?
- (script continuous killzone_player0
- (if (OR (= (volume_test_objects kill_shark (list_get (players) 0)) TRUE)
- (= (volume_test_objects kill_bldg4 (list_get (players) 0)) TRUE))
- (unit_kill (unit (list_get (players) 0)))
- )
- )
- ; Kill Player 2?
- (script continuous killzone_player1
- (if (OR (= (volume_test_objects kill_shark (list_get (players) 1)) TRUE)
- (= (volume_test_objects kill_bldg4 (list_get (players) 1)) TRUE))
- (unit_kill (unit (list_get (players) 1)))
- )
- )
- ;= TELEPORTER ===========================================================================
- ; Teleport Player 1
- (script continuous tele_player0
- (sleep_until (= (volume_test_objects tele_touch (list_get (players) 0)) TRUE))
- (begin
- (object_teleport (player0) tele_dest)
- (print "Teleporting Player 1")
- (sound_impulse_start "sound\game_sfx\multiplayer\teleporter_activate" none 1.0)
- )
- )
- ; Teleport Player 2
- (script continuous tele_player1
- (sleep_until (= (volume_test_objects tele_touch (list_get (players) 1)) TRUE))
- (begin
- (object_teleport (player1) tele_dest)
- (print "Teleporting Player 2")
- (sound_impulse_start "sound\game_sfx\multiplayer\teleporter_activate" none 1.0)
- )
- )
- ;= RESPAWN ==============================================================================
- (script continuous csquad_sniper0_spawner
- (sleep 200)
- (if (<= (ai_living_count csquad_sniper0) 0)
- (begin
- (print "Csquad Sniper have been defeated!")
- (sleep 150)
- (ai_place csquad_sniper0)
- )
- )
- )
- (script continuous csquad_drop_alpha_spawner
- (sleep 200)
- (if (<= (ai_living_fraction alien_drop_alpha) 0)
- (begin
- (sleep 300)
- (print "The Covenant are sending down reinforcements!")
- (set g_random_alien_alpha (random_range 0 5))
- ; Brutes0
- (if (= g_random_alien_alpha 0)
- (begin
- (print "Random drop ... Brutes0 at alpha")
- (sleep 100)
- (ai_place "csquad_drop_alpha_brutes0")
- )
- )
- ; Brutes1
- (if (= g_random_alien_alpha 1)
- (begin
- (print "Random drop ... Brutes0 at alpha")
- (sleep 100)
- (ai_place "csquad_drop_alpha_brutes1")
- )
- )
- ; Brutes2
- (if (= g_random_alien_alpha 2)
- (begin
- (print "Random drop ... Brutes0 at alpha")
- (sleep 100)
- (ai_place "csquad_drop_alpha_brutes2")
- )
- )
- ; Hunters0
- (if (= g_random_alien_alpha 3)
- (begin
- (print "Random drop ... Hunters0 at alpha")
- (sleep 100)
- (ai_place "csquad_drop_alpha_hunters0")
- )
- )
- ; Hunters1
- (if (= g_random_alien_alpha 4)
- (begin
- (print "Random drop ... Hunters1 at alpha")
- (sleep 100)
- (ai_place "csquad_drop_alpha_hunters0")
- )
- )
- ; Hunters2
- (if (= g_random_alien_alpha 5)
- (begin
- (print "Random drop ... Hunters2 at alpha")
- (sleep 100)
- (ai_place "csquad_drop_alpha_hunters0")
- )
- )
- )
- )
- )
- (script continuous csquad_drop_beta_spawner
- (sleep 200)
- (if (<= (ai_living_fraction alien_drop_beta) 0)
- (begin
- (sleep 200)
- (print "The Covenant are sending down reinforcements!")
- (set g_random_alien_beta (random_range 0 5))
- ; Brutes0
- (if (= g_random_alien_beta 0)
- (begin
- (print "Random drop ... Brutes0 at beta")
- (sleep 100)
- (ai_place "csquad_drop_beta_brutes0")
- )
- )
- ; Brutes1
- (if (= g_random_alien_beta 1)
- (begin
- (print "Random drop ... Brutes1 at beta")
- (sleep 100)
- (ai_place "csquad_drop_beta_brutes1")
- )
- )
- ; Brutes2
- (if (= g_random_alien_beta 2)
- (begin
- (print "Random drop ... Brutes2 at beta")
- (sleep 100)
- (ai_place "csquad_drop_beta_brutes2")
- )
- )
- ; Elites0
- (if (= g_random_alien_beta 3)
- (begin
- (print "Random drop ... Elites0 at beta")
- (sleep 100)
- (ai_place "csquad_drop_beta_elites0")
- )
- )
- ; Elites1
- (if (= g_random_alien_beta 4)
- (begin
- (print "Random drop ... Elites1 at beta")
- (sleep 100)
- (ai_place "csquad_drop_beta_elites1")
- )
- )
- ; Elites2
- (if (= g_random_alien_beta 5)
- (begin
- (print "Random drop ... Elites2 at beta")
- (sleep 100)
- (ai_place "csquad_drop_beta_elites2")
- )
- )
- )
- )
- )
- (script continuous csquad0_spawner
- (sleep 200)
- (if (<= (ai_living_count csquad) 0)
- (begin
- (print "Csquad have been defeated!")
- ; (sleep 150)
- ; (ai_place csquad_phantom0)
- (set g_phantom_unit_dump 1)
- (sleep_forever)
- )
- )
- )
- (script continuous hsquad0_spawner
- (sleep 200)
- (if (<= (ai_living_count hsquad) 0)
- (begin
- (print "Hsquad has been lost!")
- ; (sleep 150)
- ; (ai_place hsquad_pelican0)
- (set g_pelican_unit_dump 1)
- (sleep_forever)
- )
- )
- )
- (script continuous hsquad_outside_spawner
- (sleep 200)
- (if (<= (ai_living_count hsquad_outside) 0)
- (begin
- (print "Hsquad Outside has been lost!")
- (sleep 200)
- (ai_place hsquad_outside)
- )
- )
- )
- (script continuous odst_chunky_spawner
- (sleep 200)
- ; (if (<= (ai_living_count odst_chunky) 0)
- (if (<= (unit_get_health (ai_get_unit odst_chunky)) 0)
- (begin
- (print "ODST Chunky has been lost!")
- (object_create_anew door)
- ; (object_create_anew hev)
- (sleep 420)
- ; (ai_place odst_chunky)
- (ai_place odst_syn)
- ; Identify HEV
- (set g_hev_syn (ai_vehicle_get_from_starting_location odst_syn/odst_syn))
- (objects_attach g_hev_syn "door" door "")
- (sleep 180)
- (objects_detach g_hev_syn door)
- (effect_new_on_object_marker "effects\cinematics\05\hev_door_release" g_hev_syn "door_release")
- (ai_vehicle_exit odst_syn)
- (sleep 200)
- ; (effect_new_on_object_marker "effects\generic\explosions_ground\metal_destroyed" g_hev_syn "hev_d") ; Dangerous
- (effect_new_on_object_marker "effects\generic\explosions_ground\fire_explosion_no_damage" g_hev_syn "hev_d")
- (object_destroy g_hev_syn)
- (object_destroy door)
- (sleep_forever)
- )
- )
- )
- (script continuous odst_griefer_spawner
- (sleep 200)
- ; (if (<= (ai_living_count odst_griefer) 0)
- (if (<= (unit_get_health (ai_get_unit odst_griefer)) 0)
- (begin
- (print "ODST Griefer has been lost!")
- (object_create_anew door)
- ; (object_create_anew hev)
- (sleep 420)
- ; (ai_place odst_griefer)
- (ai_place odst_trigger)
- ; Identify HEV
- (set g_hev_trigger (ai_vehicle_get_from_starting_location odst_trigger/odst_trigger))
- (objects_attach g_hev_trigger "door" door "")
- (sleep 180)
- (objects_detach g_hev_trigger door)
- (effect_new_on_object_marker "effects\cinematics\05\hev_door_release" g_hev_trigger "door_release")
- (ai_vehicle_exit odst_trigger)
- (sleep 200)
- ; (effect_new_on_object_marker "effects\generic\explosions_ground\metal_destroyed" g_hev_trigger "hev_d") ; Dangerous
- (effect_new_on_object_marker "effects\generic\explosions_ground\fire_explosion_no_damage" g_hev_trigger "hev_d")
- (object_destroy g_hev_trigger)
- (object_destroy door)
- (sleep_forever)
- )
- )
- )
- (script continuous odst_holiday_spawner
- (sleep 200)
- ; (if (<= (ai_living_count odst_holiday) 0)
- (if (<= (unit_get_health (ai_get_unit odst_holiday)) 0)
- (begin
- (print "ODST Holiday has been lost!")
- (object_create_anew door)
- ; (object_create_anew hev)
- (sleep 420)
- ; (ai_place odst_holiday)
- (ai_place odst_frank)
- ; Identify HEV
- (set g_hev_frank (ai_vehicle_get_from_starting_location odst_frank/odst_frank))
- (objects_attach g_hev_frank "door" door "")
- (sleep 180)
- (objects_detach g_hev_frank door)
- (effect_new_on_object_marker "effects\cinematics\05\hev_door_release" g_hev_frank "door_release")
- (ai_vehicle_exit odst_frank)
- (sleep 200)
- ; (effect_new_on_object_marker "effects\generic\explosions_ground\metal_destroyed" g_hev_frank "hev_d") ; Dangerous
- (effect_new_on_object_marker "effects\generic\explosions_ground\fire_explosion_no_damage" g_hev_frank "hev_d")
- (object_destroy g_hev_frank)
- (object_destroy door)
- (sleep_forever)
- )
- )
- )
- (script continuous odst_roach_spawner
- (sleep 200)
- ; (if (<= (ai_living_count odst_roach) 0)
- (if (<= (unit_get_health (ai_get_unit odst_roach)) 0)
- (begin
- (print "ODST Roach has been lost!")
- (sleep 420)
- ; (ai_place odst_roach)
- (ai_place odst_slayer)
- (sleep_forever)
- )
- )
- )
- (script static void spartan_gear
- (begin_random
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) assault_rifle true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) battle_rifle true false))
- ; (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) brg true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) beam_rifle true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) brute_plasma_rifles true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) brute_shot true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) covenant_carbine true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) designated_marksman_rifle true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) gpmg true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) missile_pod+ar true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) plasma_rifles true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) pistol true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) rocket_launcher true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) shotgun true false))
- ; (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) smgs true false))
- ; (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) smg+magnum true false))
- (begin (unit_add_equipment (unit (list_get (ai_actors g_spartan_name) 0)) sniper_rifle true false))
- ; (begin (print "Leave my inventory alone!"))
- ; (begin (print "Stop touching my weapons!"))
- ; (begin (print "Keep your hands off my guns!"))
- )
- )
- (script continuous spartan_spawner
- (sleep 200)
- (if (<= (unit_get_health (ai_get_unit spartan)) 0)
- ; (if (<= (ai_living_fraction spartan)0)
- ; (if (<= (ai_living_count spartan) 0)
- (begin
- (print "Waking Spartan spawner ...")
- (set g_random_spartan (random_range 0 27))
- ; Spartan_Foxx0
- (if (= g_random_spartan 0)
- (begin
- (print "Placing Spartan Foxx0")
- (sleep 100)
- (ai_place "spartan_foxx0")
- (sleep 5)
- (set g_spartan_name "spartan_foxx0/spartan_foxx") ; use ai_current_actor or ai_current_squad next time
- ; (spartan_gear)
- )
- )
- ; Spartan_Foxx1
- (if (= g_random_spartan 1)
- (begin
- (print "Placing Spartan Foxx1")
- (sleep 100)
- (ai_place "spartan_foxx1")
- (sleep 5)
- (set g_spartan_name "spartan_foxx1/spartan_foxx")
- ; (spartan_gear)
- )
- )
- ; Spartan Raid0
- (if (= g_random_spartan 2)
- (begin
- (print "Placing Spartan Raid0")
- (sleep 100)
- (ai_place "spartan_raid0")
- (sleep 5)
- (set g_spartan_name "spartan_raid0/spartan_raid")
- ; (spartan_gear)
- )
- )
- ; Spartan Raid1
- (if (= g_random_spartan 3)
- (begin
- (print "Placing Spartan Raid1")
- (sleep 100)
- (ai_place "spartan_raid1")
- (sleep 5)
- (set g_spartan_name "spartan_raid1/spartan_raid")
- ; (spartan_gear)
- )
- )
- ; Spartan Fury0
- (if (= g_random_spartan 4)
- (begin
- (print "Placing Spartan Fury0")
- (sleep 100)
- (ai_place "spartan_fury0")
- (sleep 5)
- (set g_spartan_name "spartan_fury0/spartan_fury")
- ; (spartan_gear)
- )
- )
- ; Spartan Fury1
- (if (= g_random_spartan 5)
- (begin
- (print "Placing Spartan Fury1")
- (sleep 100)
- (ai_place "spartan_fury1")
- (sleep 5)
- (set g_spartan_name "spartan_fury1/spartan_fury")
- ; (spartan_gear)
- )
- )
- ; Spartan Scorn0
- (if (= g_random_spartan 6)
- (begin
- (print "Placing Spartan Scorn0")
- (sleep 100)
- (ai_place "spartan_scorn0")
- (sleep 5)
- (set g_spartan_name "spartan_scorn0/spartan_scorn")
- ; (spartan_gear)
- )
- )
- ; Spartan Scorn1
- (if (= g_random_spartan 7)
- (begin
- (print "Placing Spartan Scorn1")
- (sleep 100)
- (ai_place "spartan_scorn1")
- (sleep 5)
- (set g_spartan_name "spartan_scorn1/spartan_scorn")
- ; (spartan_gear)
- )
- )
- ; Spartan Avenger0
- (if (= g_random_spartan 8)
- (begin
- (print "Placing Spartan Avenger0")
- (sleep 100)
- (ai_place "spartan_avenger0")
- (sleep 5)
- (set g_spartan_name "spartan_avenger0/spartan_avenger")
- ; (spartan_gear)
- )
- )
- ; Spartan Avenger1
- (if (= g_random_spartan 9)
- (begin
- (print "Placing Spartan Avenger1")
- (sleep 100)
- (ai_place "spartan_avenger1")
- (sleep 5)
- (set g_spartan_name "spartan_avenger1/spartan_avenger")
- ; (spartan_gear)
- )
- )
- ; Spartan Cheeks0
- (if (= g_random_spartan 10)
- (begin
- (print "Placing Spartan Cheeks0")
- (sleep 100)
- (ai_place "spartan_cheeks0")
- (sleep 5)
- (set g_spartan_name "spartan_cheeks0/spartan_cheeks")
- ; (spartan_gear)
- )
- )
- ; Spartan Cheeks1
- (if (= g_random_spartan 11)
- (begin
- (print "Placing Spartan Cheeks1")
- (sleep 100)
- (ai_place "spartan_cheeks1")
- (sleep 5)
- (set g_spartan_name "spartan_cheeks1/spartan_cheeks")
- ; (spartan_gear)
- )
- )
- ; Spartan Opti0
- (if (= g_random_spartan 12)
- (begin
- (print "Placing Spartan Opti0")
- (sleep 100)
- (ai_place "spartan_opti0")
- (sleep 5)
- (set g_spartan_name "spartan_opti0/spartan_opti")
- ; (spartan_gear)
- )
- )
- ; Spartan Opti1
- (if (= g_random_spartan 13)
- (begin
- (print "Placing Spartan Opti1")
- (sleep 100)
- (ai_place "spartan_opti1")
- (sleep 5)
- (set g_spartan_name "spartan_opti1/spartan_opti")
- ; (spartan_gear)
- )
- )
- ; Spartan_Pirate0
- (if (= g_random_spartan 14)
- (begin
- (print "Placing Spartan Pirate0")
- (sleep 100)
- (ai_place "spartan_pirate0")
- (sleep 5)
- (set g_spartan_name "spartan_pirate0/spartan_pirate")
- ; (spartan_gear)
- )
- )
- ; Spartan_Pirate1
- (if (= g_random_spartan 15)
- (begin
- (print "Placing Spartan Pirate1")
- (sleep 100)
- (ai_place "spartan_pirate1")
- (sleep 5)
- (set g_spartan_name "spartan_pirate1/spartan_pirate")
- ; (spartan_gear)
- )
- )
- ; Spartan Kills0
- (if (= g_random_spartan 16)
- (begin
- (print "Placing Spartan Kills0")
- (sleep 100)
- (ai_place "spartan_kills0")
- (sleep 5)
- (set g_spartan_name "spartan_kills0/spartan_kills")
- ; (spartan_gear)
- )
- )
- ; Spartan Kills1
- (if (= g_random_spartan 17)
- (begin
- (print "Placing Spartan Kills1")
- (sleep 100)
- (ai_place "spartan_kills1")
- (sleep 5)
- (set g_spartan_name "spartan_kills1/spartan_kills")
- ; (spartan_gear)
- )
- )
- ; Spartan Bo0
- (if (= g_random_spartan 18)
- (begin
- (print "Placing Spartan Bo0")
- (sleep 100)
- (ai_place "spartan_bo0")
- (sleep 5)
- (set g_spartan_name "spartan_bo0/spartan_bo")
- ; (spartan_gear)
- )
- )
- ; Spartan Bo1
- (if (= g_random_spartan 19)
- (begin
- (print "Placing Spartan Bo1")
- (sleep 100)
- (ai_place "spartan_bo1")
- (sleep 5)
- (set g_spartan_name "spartan_bo1/spartan_bo")
- ; (spartan_gear)
- )
- )
- ; Spartan Carnage0
- (if (= g_random_spartan 20)
- (begin
- (print "Placing Spartan Carnage0")
- (sleep 100)
- (ai_place "spartan_carnage0")
- (sleep 5)
- (set g_spartan_name "spartan_carnage0/spartan_carnage")
- ; (spartan_gear)
- )
- )
- ; Spartan Carnage1
- (if (= g_random_spartan 21)
- (begin
- (print "Placing Spartan Carnage1")
- (sleep 100)
- (ai_place "spartan_carnage1")
- (sleep 5)
- (set g_spartan_name "spartan_carnage1/spartan_carnage")
- ; (spartan_gear)
- )
- )
- ; Spartan Cypher0
- (if (= g_random_spartan 22)
- (begin
- (print "Placing Spartan Cypher0")
- (sleep 100)
- (ai_place "spartan_cypher0")
- (sleep 5)
- (set g_spartan_name "spartan_cypher0/spartan_cypher")
- ; (spartan_gear)
- )
- )
- ; Spartan Cypher1
- (if (= g_random_spartan 23)
- (begin
- (print "Placing Spartan Cypher1")
- (sleep 100)
- (ai_place "spartan_cypher1")
- (sleep 5)
- (set g_spartan_name "spartan_cypher1/spartan_cypher")
- ; (spartan_gear)
- )
- )
- ; Spartan Grape0
- (if (= g_random_spartan 24)
- (begin
- (print "Placing Spartan Grape0")
- (sleep 100)
- (ai_place "spartan_grape0")
- (sleep 5)
- (set g_spartan_name "spartan_grape0/spartan_grape")
- ; (spartan_gear)
- )
- )
- ; Spartan Grape1
- (if (= g_random_spartan 25)
- (begin
- (print "Placing Spartan Grape1")
- (sleep 100)
- (ai_place "spartan_grape1")
- (sleep 5)
- (set g_spartan_name "spartan_grape1/spartan_grape")
- ; (spartan_gear)
- )
- )
- ; Spartan Shade0
- (if (= g_random_spartan 26)
- (begin
- (print "Placing Spartan Shade0")
- (sleep 100)
- (ai_place "spartan_shade0")
- (sleep 5)
- (set g_spartan_name "spartan_shade0/spartan_shade")
- ; (spartan_gear)
- )
- )
- ; Spartan Shade1
- (if (= g_random_spartan 27)
- (begin
- (print "Placing Spartan Shade1")
- (sleep 100)
- (ai_place "spartan_shade1")
- (sleep 5)
- (set g_spartan_name "spartan_shade1/spartan_shade")
- ; (spartan_gear)
- )
- )
- )
- ))
- (script continuous hsquad_pelican0_spawner
- (sleep 200)
- (if (<= (ai_living_count hsquad_pelican0) 0)
- (begin
- (print "Hsquad Pelican dump has been lost!")
- (sleep 300)
- (ai_place hsquad_pelican0)
- (cs_run_command_script hsquad_pelican0/pilot cs_hsquad_pelican0_advance0)
- (set g_pelican_unit_dump 1)
- )
- )
- )
- (script continuous csquad_phantom0_spawner
- (sleep 200)
- (if (<= (ai_living_count csquad_phantom0) 0)
- (begin
- (print "Csquad Phantom dump has been defeated!")
- (sleep 300)
- (ai_place csquad_phantom0)
- (cs_run_command_script csquad_phantom0/pilot cs_csquad_phantom0_advance0)
- (set g_phantom_unit_dump 1)
- )
- )
- )
- (script continuous csquad_ghost2_spawner
- (sleep 200)
- ; (if (<= (ai_living_count csquad_ghost2) 0)
- (if (<= (unit_get_health (ai_get_unit csquad_ghost2)) 0)
- (begin
- (print "Csquad Ghost has been defeated!")
- (sleep 300)
- (ai_place csquad_ghost2)
- (cs_run_command_script csquad_ghost2/driver cs_csquad_ghost2_advance0)
- )
- )
- )
- (script continuous csquad_banshee1_spawner
- (sleep 200)
- (if (<= (ai_living_count csquad_banshee1) 0)
- (begin
- (print "Csquad Banshee has been defeated!")
- (sleep 700)
- (ai_place csquad_banshee1)
- (cs_run_command_script csquad_banshee1/pilot cs_csquad_banshee1_advance0)
- )
- )
- )
- (script continuous csquad_drop_spawner
- (sleep 300)
- (if (<= (ai_living_fraction alien_drop)
- ; (if (<= (ai_living_count alien_drop)
- 0)
- (begin
- (sleep 600)
- (print "The Covenant Capital Ship is sending down reinforcements!")
- (set g_random_alien (random_range 1 24)) ; 0 24
- ; Tartarus
- (if (= g_random_alien 0)
- (begin
- (print "Random drop ... Tartarus")
- (sleep 100)
- ; Remove Tartarus invinciblity
- (object_set_function_variable (ai_get_object csquad_drop_tartarus0) "invincibility" 0 0.1)
- (ai_place "csquad_drop_tartarus0")
- )
- )
- ; Brutes0
- (if (= g_random_alien 1)
- (begin
- (print "Random drop ... Brutes0")
- (sleep 100)
- (ai_place "csquad_drop_brutes0")
- )
- )
- ; Brutes1
- (if (= g_random_alien 2)
- (begin
- (print "Random drop ... Brutes1")
- (sleep 100)
- (ai_place "csquad_drop_brutes1")
- )
- )
- ; Brutes2
- (if (= g_random_alien 3)
- (begin
- (print "Random drop ... Brutes2")
- (sleep 100)
- (ai_place "csquad_drop_brutes2")
- )
- )
- ; Bugger0
- (if (= g_random_alien 4)
- (begin
- (print "Random drop ... bugger0")
- (sleep 100)
- (ai_place "csquad_drop_bugger0/1")
- (object_set_velocity (ai_get_object csquad_drop_bugger0/1) 0 0 -28.6)
- (cs_run_command_script csquad_drop_bugger0/1 cs_csquad_drop_bugger_advance0)
- (sleep (random_range 3 9))
- (ai_place "csquad_drop_bugger0/2")
- (object_set_velocity (ai_get_object csquad_drop_bugger0/2) 0 0 -28.5)
- (cs_run_command_script csquad_drop_bugger0/2 cs_csquad_drop_bugger_advance0)
- (sleep (random_range 3 9))
- (ai_place "csquad_drop_bugger0/3")
- (object_set_velocity (ai_get_object csquad_drop_bugger0/3) 0 0 -28.4)
- (cs_run_command_script csquad_drop_bugger0/3 cs_csquad_drop_bugger_advance0)
- (sleep (random_range 3 9))
- (ai_place "csquad_drop_bugger0/4")
- (object_set_velocity (ai_get_object csquad_drop_bugger0/4) 0 0 -28.5)
- (cs_run_command_script csquad_drop_bugger0/4 cs_csquad_drop_bugger_advance0)
- (sleep (random_range 3 9))
- (ai_place "csquad_drop_bugger0/5")
- (object_set_velocity (ai_get_object csquad_drop_bugger0/5) 0 0 -28.5)
- (cs_run_command_script csquad_drop_bugger0/5 cs_csquad_drop_bugger_advance0)
- (sleep (random_range 3 9))
- (ai_place "csquad_drop_bugger0/6")
- (object_set_velocity (ai_get_object csquad_drop_bugger0/6) 0 0 -28.5)
- (cs_run_command_script csquad_drop_bugger0/6 cs_csquad_drop_bugger_advance0)
- ; (ai_magically_see csquad_drop_bugger0 hsquad)
- (ai_magically_see ai_current_squad human) ; hsquad
- )
- )
- ; Bugger1
- (if (= g_random_alien 5)
- (begin
- (print "Random drop ... bugger1")
- (sleep 100)
- (ai_place "csquad_drop_bugger1/1")
- (object_set_velocity (ai_get_object csquad_drop_bugger1/1) 0 0 -28.6)
- (cs_run_command_script csquad_drop_bugger1/1 cs_csquad_drop_bugger_advance0)
- (sleep (random_range 3 9))
- (ai_place "csquad_drop_bugger1/2")
- (object_set_velocity (ai_get_object csquad_drop_bugger1/2) 0 0 -28.5)
- (cs_run_command_script csquad_drop_bugger1/2 cs_csquad_drop_bugger_advance0)
- (sleep (random_range 3 9))
- (ai_place "csquad_drop_bugger1/3")
- (object_set_velocity (ai_get_object csquad_drop_bugger1/3) 0 0 -28.4)
- (cs_run_command_script csquad_drop_bugger1/3 cs_csquad_drop_bugger_advance0)
- (sleep (random_range 3 9))
- (ai_place "csquad_drop_bugger1/4")
- (object_set_velocity (ai_get_object csquad_drop_bugger1/4) 0 0 -28.5)
- (cs_run_command_script csquad_drop_bugger1/4 cs_csquad_drop_bugger_advance0)
- (sleep (random_range 3 9))
- (ai_place "csquad_drop_bugger1/5")
- (object_set_velocity (ai_get_object csquad_drop_bugger1/5) 0 0 -28.5)
- (cs_run_command_script csquad_drop_bugger1/5 cs_csquad_drop_bugger_advance0)
- (sleep (random_range 3 9))
- (ai_place "csquad_drop_bugger1/6")
- (object_set_velocity (ai_get_object csquad_drop_bugger1/6) 0 0 -28.5)
- (cs_run_command_script csquad_drop_bugger1/6 cs_csquad_drop_bugger_advance0)
- ; (ai_magically_see csquad_drop_bugger1 hsquad)
- (ai_magically_see ai_current_squad human) ; hsquad
- )
- )
- ; Elites0
- (if (= g_random_alien 6)
- (begin
- (print "Random drop ... Elites0")
- (sleep 100)
- (ai_place "csquad_drop_elites0")
- )
- )
- ; Elites1
- (if (= g_random_alien 7)
- (begin
- (print "Random drop ... Elites1")
- (sleep 100)
- (ai_place "csquad_drop_elites1")
- )
- )
- ; Elites2
- (if (= g_random_alien 8)
- (begin
- (print "Random drop ... Elites2")
- (sleep 100)
- (ai_place "csquad_drop_elites2")
- )
- )
- ; SpecOps0
- (if (= g_random_alien 9)
- (begin
- (print "Random drop ... SpecOps0")
- (sleep 100)
- (ai_place "csquad_drop_specops0")
- )
- )
- ; Stealth0
- (if (= g_random_alien 10)
- (begin
- (print "Random drop ... Stealth0")
- (sleep 100)
- (ai_place "csquad_drop_stealth0")
- )
- )
- ; Ranger0
- (if (= g_random_alien 11)
- (begin
- (print "Random drop ... Ranger0")
- (sleep 100)
- (ai_place "csquad_drop_ranger0/1")
- (cs_run_command_script csquad_drop_ranger0/1 cs_csquad_drop_ranger_advance0)
- (sleep (random_range 6 32))
- (ai_place "csquad_drop_ranger0/2")
- (cs_run_command_script csquad_drop_ranger0/2 cs_csquad_drop_ranger_advance0)
- (sleep (random_range 6 32))
- (ai_place "csquad_drop_ranger0/3")
- (cs_run_command_script csquad_drop_ranger0/3 cs_csquad_drop_ranger_advance0)
- (sleep (random_range 6 32))
- (ai_place "csquad_drop_ranger0/4")
- (cs_run_command_script csquad_drop_ranger0/4 cs_csquad_drop_ranger_advance0)
- (ai_magically_see ai_current_squad human)
- )
- )
- ; Ranger1
- (if (= g_random_alien 12)
- (begin
- (print "Random drop ... Ranger1")
- (sleep 100)
- (ai_place "csquad_drop_ranger1/1")
- (cs_run_command_script csquad_drop_ranger1/1 cs_csquad_drop_ranger_advance0)
- (sleep (random_range 6 32))
- (ai_place "csquad_drop_ranger1/2")
- (cs_run_command_script csquad_drop_ranger1/2 cs_csquad_drop_ranger_advance0)
- (sleep (random_range 6 32))
- (ai_place "csquad_drop_ranger1/3")
- (cs_run_command_script csquad_drop_ranger1/3 cs_csquad_drop_ranger_advance0)
- (sleep (random_range 6 32))
- (ai_place "csquad_drop_ranger1/4")
- (cs_run_command_script csquad_drop_ranger1/4 cs_csquad_drop_ranger_advance0)
- (ai_magically_see ai_current_squad human)
- )
- )
- ; Grunts0
- (if (= g_random_alien 13)
- (begin
- (print "Random drop ... Grunts0")
- (sleep 100)
- (ai_place "csquad_drop_grunts0")
- )
- )
- ; Grunts1
- (if (= g_random_alien 14)
- (begin
- (print "Random drop ... Grunts1")
- (sleep 100)
- (ai_place "csquad_drop_grunts1")
- )
- )
- ; Grunts2
- (if (= g_random_alien 15)
- (begin
- (print "Random drop ... Grunts2")
- (sleep 100)
- (ai_place "csquad_drop_grunts2")
- )
- )
- ; Hunters0
- (if (= g_random_alien 16)
- (begin
- (print "Random drop ... Hunters0")
- (sleep 100)
- (ai_place "csquad_drop_hunters0")
- )
- )
- ; Hunters1
- (if (= g_random_alien 17)
- (begin
- (print "Random drop ... Hunters1")
- (sleep 100)
- (ai_place "csquad_drop_hunters0")
- )
- )
- ; Hunters2
- (if (= g_random_alien 18)
- (begin
- (print "Random drop ... Hunters2")
- (sleep 100)
- (ai_place "csquad_drop_hunters0")
- )
- )
- ; Jackals0
- (if (= g_random_alien 19)
- (begin
- (print "Random drop ... Jackals0")
- (sleep 100)
- (ai_place "csquad_drop_jackals0")
- )
- )
- ; Jackals1
- (if (= g_random_alien 20)
- (begin
- (print "Random drop ... Jackals1")
- (sleep 100)
- (ai_place "csquad_drop_jackals1")
- )
- )
- ; Jackals2
- (if (= g_random_alien 21)
- (begin
- (print "Random drop ... Jackals2")
- (sleep 100)
- (ai_place "csquad_drop_jackals2")
- )
- )
- ; Wraith0
- (if (= g_random_alien 22)
- (begin
- (print "Random drop ... Wraith0")
- (sleep 100)
- (ai_place "csquad_drop_wraith0")
- )
- )
- ; Wraith1
- (if (= g_random_alien 23)
- (begin
- (print "Random drop ... Wraith1")
- (sleep 100)
- (ai_place "csquad_drop_wraith0")
- )
- )
- ; Wraith2
- (if (= g_random_alien 24)
- (begin
- (print "Random drop ... Wraith2")
- (sleep 100)
- (ai_place "csquad_drop_wraith0")
- )
- )
- )
- ))
- (script continuous csquad_wraith2_spawner
- (sleep 200)
- (if (<= (unit_get_health (ai_get_unit csquad_wraith1/driver)) 0)
- (begin
- (print "Wraith1 has been defeated!")
- (sleep 450)
- (ai_place csquad_wraith2)
- (sleep_forever)
- )
- )
- )
- (script continuous hsquad_gunner_spawner
- (sleep 200)
- ; (if (<= (ai_living_count human_gunner) 0)
- (if (<= (unit_get_health (ai_get_unit hsquad_gunner/gunner)) 0)
- (begin
- (print "Hsquad Gunner has been lost!")
- (sleep 250)
- (ai_place hsquad_gunner)
- )
- )
- )
- (script continuous hsquad_warthog0_flipper
- (sleep 200)
- (if (= (vehicle_overturned g_gausshog) 1)
- (begin
- (print "Flip that hog!")
- (sleep 100)
- (vehicle_flip g_gausshog)
- )
- )
- )
- ;= CHAPTER TITLES =======================================================================
- (script dormant chapter_title0
- (sleep 30)
- ; (cinematic_set_title title0)
- (sleep 150)
- (hud_cinematic_fade 1 0.5)
- (cinematic_show_letterbox false)
- )
- ;= MISC =================================================================================
- (script static boolean player_in_vehicle
- (or
- (unit_in_vehicle (unit (player0)))
- (and
- (game_is_cooperative)
- (unit_in_vehicle (unit (player1)))
- )
- )
- )
- (script static boolean players_in_vehicle
- (and
- (unit_in_vehicle (unit (player0)))
- (or
- (not (game_is_cooperative))
- (unit_in_vehicle (unit (player1)))
- )
- )
- )
- ;= MISSION MAIN =========================================================================
- (script dormant mission_start
- ; Initial chapter title
- ; (wake chapter_title0)
- ; Initial checkpoint
- ; (sleep 150)
- ; (game_save)
- ; Identify Pelican
- (set g_pelican (ai_vehicle_get_from_starting_location hsquad_pelican0/pilot))
- ; Identify Phantom
- (set g_phantom (ai_vehicle_get_from_starting_location csquad_phantom0/pilot))
- ; Identify Scorpion
- (set g_scorpion (ai_vehicle_get_from_starting_location hsquad_scorpion0/driver))
- ; Identify Wraith
- (set g_wraith (ai_vehicle_get_from_starting_location csquad_wraith1/driver))
- ; Identify Warthog
- (set g_warthog (ai_vehicle_get_from_starting_location hsquad_warthog1/driver))
- ; Identify Gausshog
- (set g_gausshog (ai_vehicle_get_from_starting_location hsquad_warthog0/warthog0))
- ; Identify Guntower
- (set g_guntower (ai_vehicle_get_from_starting_location csquad_guntower0/guntower0))
- ; Initial order for Gunner to get into Gausshog
- (ai_vehicle_enter hsquad_gunner g_gausshog "warthog_g")
- ; Initial order for Gunner to get into Guntower
- (ai_vehicle_enter csquad_gunner g_guntower "guntower_d")
- ; Enable AI vehicles
- (cs_run_command_script csquad_drop_wraith0/driver cs_csquad_drop_wraith0_advance0)
- (cs_run_command_script csquad_ghost2/driver cs_csquad_ghost2_advance0)
- (cs_run_command_script csquad_ghost0/driver cs_csquad_ghost0_advance0)
- (cs_run_command_script csquad_banshee1/pilot cs_csquad_banshee1_advance0)
- (cs_run_command_script csquad_phantom0/pilot cs_csquad_phantom0_advance0)
- (cs_run_command_script hsquad_pelican0/pilot cs_hsquad_pelican0_advance0)
- (cs_run_command_script hsquad_warthog1/driver cs_hsquad_warthog1_advance0)
- (cs_run_command_script hsquad_scorpion0/driver cs_hsquad_scorpion_advance0)
- (cs_run_command_script hsquad/1 cs_hsquad_deploy_turret0)
- ; Give a Marine Johnson's hat
- (object_set_permutation (ai_get_object hsquad/1) "helmet" "hat")
- ; Remove a Marines helmet
- ; (object_set_permutation (ai_get_object hsquad/1) "helmet" "")
- ; Give Marine a Comm Pack and Pilot helmt
- (object_set_permutation (ai_get_object hsquad/2) "comm_pack" "on")
- (object_set_permutation (ai_get_object hsquad/2) "helmet" "pilot")
- ; Grab what you can, supplies are running low
- (set g_randomh1 (random_range 0 8))
- (if (= g_randomh1 0) (object_set_permutation (ai_get_object hsquad_outside/1) "helmet" ""))
- (if (= g_randomh1 1) (object_set_permutation (ai_get_object hsquad_outside/2) "helmet" ""))
- (if (= g_randomh1 2) (object_set_permutation (ai_get_object hsquad_outside/2) "helmet" "hat"))
- (if (= g_randomh1 3) (object_set_permutation (ai_get_object hsquad_outside/3) "helmet" ""))
- (if (= g_randomh1 4) (object_set_permutation (ai_get_object hsquad_outside/3) "helmet" "hat"))
- (if (= g_randomh1 5) (object_set_permutation (ai_get_object hsquad_outside/4) "helmet" ""))
- (if (= g_randomh1 6) (object_set_permutation (ai_get_object hsquad_outside/4) "helmet" "hat"))
- (if (= g_randomh1 7) (object_set_permutation (ai_get_object hsquad_pelican0/passenger0) "helmet" ""))
- (if (= g_randomh1 8) (object_set_permutation (ai_get_object hsquad_pelican0/passenger0) "helmet" "hat"))
- ; Remove ODST Chunky's head
- ; (object_set_permutation (ai_get_object odst_chunky/odst_chunky) "head" "")
- ; Change Warthog1 Gunner head to wounded
- (object_set_permutation (ai_get_object hsquad_warthog1/gunner) "head" "wounded")
- ; These helmets don't come cheap
- (set g_randomh1 (random_range 0 6))
- (if (= g_randomh1 0) (object_set_permutation (ai_get_object odst_chunky/odst_chunky) "head" "odst"))
- (if (= g_randomh1 1) (object_set_permutation (ai_get_object odst_griefer/odst_griefer) "head" "odst"))
- (if (= g_randomh1 2) (object_set_permutation (ai_get_object odst_holiday/odst_holiday) "head" "odst"))
- (if (= g_randomh1 3) (object_set_permutation (ai_get_object odst_roach/odst_roach) "head" "odst"))
- (if (= g_randomh1 4) (object_set_permutation (ai_get_object odst_frank/odst_frank) "head" "odst"))
- (if (= g_randomh1 5) (object_set_permutation (ai_get_object odst_slayer/odst_slayer) "head" "odst"))
- (if (= g_randomh1 6) (object_set_permutation (ai_get_object odst_trigger/odst_trigger) "head" "odst"))
- ; Lock the Scorpion so the other AI cannot take a seat
- (ai_vehicle_reserve (ai_vehicle_get hsquad_scorpion0/driver) true)
- ; (ai_vehicle_reserve (ai_vehicle_get hsquad_warthog0/warthog0) true)
- (ai_vehicle_reserve_seat g_gausshog "warthog_d" true)
- (ai_vehicle_reserve_seat g_gausshog "warthog_p" true)
- ; Remove Tartarus invinciblity
- (object_set_function_variable (ai_get_object csquad_drop_tartarus0) "invincibility" 0 0.1)
- ; WHAT IS YOUR MAJOR MALFUNCTION, NUMBNUTS?
- ; Gravity Lift visibility
- (object_set_function_variable carrier "grav_lift_control" 1 0)
- ; (object_set_function_variable carrier "grav_lift_control" 0 75)
- ; (print "grav-lift deactivate")
- ; Enable Elite Ranger Jetpack
- ; (print "jetpack on")
- ; (object_set_function_variable elite_ranger_agro "vertical_thrust" 1 0)
- ; (object_set_function_variable elite_ranger_agro "vertical_thrust" 0 0)
- ; Enable Hunter Light
- ; (object_set_function_variable hunter_agro "weapon_illumination" 1 0)
- ; Enable Brute Shield
- ; (object_set_function_variable brute_agro "shield" 1 0)
- ; Enable Plasma Turret Barrel Spin
- ; (object_set_function_variable plasma_turret "barrel_spin" 1 0)
- ; (object_set_function_variable plasma_turret "power" 1 0)
- ; Enable kill volumes
- (kill_volume_enable kill_bldg4)
- (kill_volume_enable kill_shark)
- (print "End of mission_start")
- )
- (script static void start
- (wake mission_start)
- )
- (script startup mission_main
- ; Necessary startup stuff
- (ai_allegiance player human)
- (ai_allegiance covenant prophet)
- ; Clear objectives
- ; (objectives_clear)
- ; (objectives_show_up_to 1)
- ; Protect players
- (object_cannot_take_damage (players))
- (object_hide (player0) true)
- (object_hide (player1) true)
- ; (profile_reset)
- ; (game_is_cooperative)
- ; (game_coop_players 4)
- (texture_cache_flush)
- (geometry_cache_flush)
- (rasterizer_bloom_override false)
- (game_can_use_flashlights false)
- (camera_control false)
- ; (camera_control on)
- ; (switch_bsp 0)
- (fade_in 1 1 1 0)
- (render_lights 1)
- ; Begin the mission
- ; Comment this out when you're testing individual encounters
- ; (if (> (player_count) 0) (start))
- (start)
- (print "Begin the mission.")
- (version)
- )
- (script continuous jet_pack_scenery
- ; (sleep_until (= g_jetpack_enabled 1) 1)
- ; Attach Jetpack scenery to Player 1
- (object_create jetpack)
- (objects_attach (unit (player0)) "jet_pack" jetpack "")
- )
- (script continuous jet_pack_boost
- ; (sleep_until (= g_jetpack_enabled 1) 1)
- ; (sleep_until (and (player_action_test_jump) (player_action_test_look_relative_up)) 15) ; player_action_test_move_relative_all_directions
- ; (sleep_until (and (>= g_jetfuel 20) (player_action_test_jump) 1))
- (sleep_until (>= g_jetfuel 20) 1)
- (player_action_test_reset)
- (sleep_until (player_action_test_jump) 1) ;1 ; 7 ; 15
- (object_set_velocity (player0) 1.5 0 4.5) ; move 1.5 forward and 4.5 upward
- (effect_new_on_object_marker "effects\objects\weapons\support_high\rocket_launcher\rocket_fire1" jetpack "fx_jets_human")
- (set g_jetfuel (- g_jetfuel 20))
- (sleep 15) ; 10
- (player_action_test_reset)
- ; (set g_jetpack_enabled 1)
- ; (effect_new_on_object_marker "effects\objects\characters\sentinel\small_explosion_sparks" jetpack "body") ; used up and burned out
- ; (effect_new_on_object_marker "effects\objects\characters\sentinel_constructor\destroyed" jetpack "body") ; not bad looking boost, remove garbage
- ; (effect_new_on_object_marker "effects\objects\characters\sentinel_enforcer\perm_destroyed_spark" jetpack "body") ; electric shorting out
- ; (effect_new_on_object_marker "effects\scenery\fires\fire_jet_stream1" jetpack "body")
- ; (objects_attach (unit (player0)) "" jetstream "uplift")
- ; (objects_attach (unit (player0)) "contrail" jetstream "")
- ;(sleep_until (> (player_action_test_jump)) 1)
- ; (if (player_action_test_jump)
- ; (begin
- ; (effect_new_on_object_marker "effects\objects\characters\sentinel\small_explosion_sparks" jetpack "body")
- ; (objects_attach (unit (player0)) "" jetstream "uplift")
- ; )
- ; )
- ; (effect_new_on_object_marker "effects\objects\characters\masterchief\spartan_ranger" (jetpack) "contrail")
- ; (effect_new_on_object_marker "effects\scenery\sparks\spark_ember_medium" (player0) "body")
- ; (sleep 2)
- ; (sound_impulse_stop "sound\vehicles\jet_pack\jet_pack\loop")
- ; (sound_looping_start "sound\vehicles\jet_pack\jet_pack" jetpack 3)
- ; (sleep 2)
- ; (sound_looping_stop "sound\vehicles\jet_pack\jet_pack") ; sound_looping_stop_immediately
- ; (sound_impulse_start "sound\vehicles\jet_pack\jet_pack\loop" jetpack 1.0) ; in ; out
- ; (sleep (sound_impulse_language_time "sound\vehicles\jet_pack\jet_pack\loop"))
- )
- (script continuous jet_pack_refuel ; jet_pack_audio
- (sleep_until (<= g_jetfuel 0) 1)
- (sound_impulse_start "sound\vehicles\jet_pack\jet_pack\out" jetpack 0.65)
- (sleep 100)
- ; (set g_jetfuel (+ g_jetfuel 100))
- (set g_jetfuel 100)
- (print "Jet Pack is ready")
- (sound_impulse_start "sound\ui\active_cammo_ready" jetpack 0.75)
- )
- ;*
- (script continuous is_jet_pack_on
- (sleep_until (player_flashlight_on) 1) ; 2 ; 15
- (player_action_test_reset)
- ; (sleep_until (or (player_flashlight_on) (player_active_camouflage_on)) 15)
- ; (if (<= (ai_living_count csquad_sniper0) 0)
- (begin
- (if (= g_jetpack_enabled 0)
- (set g_jetpack_enabled 1)
- )
- (sleep_until (player_flashlight_on) 1) ; 2 ; 15
- (player_action_test_reset)
- ; (if (= g_jetpack_enabled 1)
- (set g_jetpack_enabled 0)
- ; Remove Jetpack scenery from Player 1
- (objects_detach (unit (player0)) jetpack)
- (object_destroy jetpack)
- )
- )
- *;
- ;= RECYCLE ==============================================================================
- (script continuous waste_management
- (sleep 115)
- (garbage_collect_now)
- ; Insert player(s) into ai_player squad
- ; (ai_attach (unit (list_get (players) 0)) ai_player)
- ; (player_enable_input 0)
- ; Activate with the flashlight?
- ; (ai_force_active_by_unit (unit (list_get (players) 0)) 1)
- ; Keep the squad active
- ; (ai_force_active "ai_player" true)
- ; Test if the player(s) are part of ai_player squad
- ; (ai_living_count ai_player)
- ; (cs_run_command_script ai_player cs_ai_player_style) ; /1
- (ai_force_active "csquad" true)
- (ai_force_active "hsquad_outside" true)
- (ai_force_active "odst" true)
- (ai_force_active "spartan" true)
- ; Disregard the Pelican
- ; (ai_disregard g_pelican true)
- (ai_disregard (ai_vehicle_get hsquad_pelican0/pilot) true)
- ; (ai_disregard (ai_actors hsquad_pelican0) true)
- ; Disregard the Phantom
- ; (ai_disregard g_phantom true)
- (ai_disregard (ai_vehicle_get csquad_phantom0/pilot) true)
- ; (ai_disregard (ai_actors csquad_phantom0) true)
- ; Disregard the ODST Griefer (lower tower sniper)
- (ai_disregard (ai_actors odst_griefer) true)
- ; (camera_set_first_person (unit (list_get (ai_actors hsquad_outside))))
- ; (unit_add_equipment (unit (player0)) wimpy true false)
- ; (unit_add_equipment (unit (list_get (ai_actors hsquad_outside/1) 0)) battle_rifle true false)
- ; (unit_add_equipment (unit (list_get (ai_actors csquad_drop_brutes0/4) 0)) rocket_launcher_brute true false)
- ; SKULL CHEATS
- ; (ice_cream_flavor_stock 0) ; Envy - The MC now has an Active Camouflage device
- ; (ice_cream_flavor_stock 1) ; Grunt Birthday Party
- ; (ice_cream_flavor_stock 2) ; Assassins
- ; (ice_cream_flavor_stock 3) ; Thunderstorm
- ; (ice_cream_flavor_stock 4) ; Famine
- ; (ice_cream_flavor_stock 5) ; Daddy!
- ; (ice_cream_flavor_stock 6) ; Blind
- ; (ice_cream_flavor_stock 7) ; Ghost - AI characters will not flinch from attacks
- ; (ice_cream_flavor_stock 8) ; Black eye - Your shield does not charge normally
- ; (ice_cream_flavor_stock 9) ; Catch - A.I. will throw more grenades
- ; (ice_cream_flavor_stock 10) ; Sputnik
- ; (ice_cream_flavor_stock 11) ; Iron
- ; (ice_cream_flavor_stock 12) ; Mythic - Enemies & allies have double the health & shielding they have on legendary
- ; (ice_cream_flavor_stock 13) ; Angry - Enemies fire weapons faster & more frequently
- ; (ice_cream_flavor_stock 14) ; ???
- ; Enable Camo Cheat
- ; (cheat_active_camouflage_by_player 0 true)
- ; (cheats_load)
- ; (cheat_bump_possession 1)
- ; (cheat_jetpack 1)
- ; (cheat_valhalla 1)
- ; (cheat_all_powerups 1)
- ; (cheat_all_vehicles 1)
- ; (cheat_all_weapons 1)
- ; Attach Jetpack scenery to Player 1
- ; (objects_attach (unit (player0)) "body" jetpack "")
- ; Attach Jetpack to Spartan AI
- ; (objects_attach (unit (list_get (ai_actors spartan) 0)) "jetpack" jetpack "")
- (ai_vehicle_reserve_seat g_gausshog "warthog_d" true)
- (ai_vehicle_reserve_seat g_gausshog "warthog_p" true)
- ; (ai_vehicle_reserve g_gausshog true)
- ; (ai_vehicle_reserve (ai_vehicle_get hsquad_warthog0/warthog0) true)
- ; Orders Human Gunner to get back on that Hog (which she will usually do)
- (ai_vehicle_enter hsquad_gunner g_gausshog "warthog_g")
- ; Orders Covenant Gunner to get back on that Guntower
- (ai_vehicle_enter csquad_gunner g_guntower "guntower_d")
- (ai_magically_see ai_current_squad hsquad_scorpion0)
- ; Orders Hsquad Outside Marine 4 to get on that Turret
- (ai_vehicle_enter hsquad_outside/4 human_turret)
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement