--[[
_A_GA_DT_03.lua
SR3 Activity Script
DATE: 10/05/10
AUTHOR: Anne Chilldon
Ryan Slack
]]--
-- *************************
--
-- Data Parameters
--
-- *************************
-- Add/modify the data below to match the activity instance.
-- Do a find/replace on [change_to_activity_name] and replace it with the name of this
-- instance of Guardian Angel.
-- Debug flags --
-- Tweakable Parameters --
_A_GA_DT_03_tweak_params = {
car_speed_override = 60.0,
heli_follow_dist = 25.0,
notoriety_team = "",
notoriety_min_level = 4,
notoriety_max_level = 5,
sniper_weapon_slot = WEAPON_SLOT_SPECIAL,
rpg_weapon_slot = WEAPON_SLOT_EXPLOSIVE,
}
-- Groups --
_A_GA_DT_03_groups = {
protectees = {
name = "ga_dt3_protectee_group",
chars = { "npc_Pierce" },
vehicle = "veh_PierceCar",
},
heli_group = {
name = "ga_dt3_heli_group",
chars = { "npc_Heli_Pilot" },
vehicle = "veh_Player_heli",
},
roadblock1 = {
name = "ga_dt3_attack1",
chars = { "npc_attack1 001", "npc_attack1 002", "npc_attack1 003",
"npc_attack1 004", "npc_attack1 005", "npc_attack1 006" },
vehicle = { "veh_attack1 001", "veh_attack1 002" },
},
roadblock2 = {
name = "ga_dt3_attack2",
chars = { "npc_attack2 001", "npc_attack2 002", "npc_attack2 003",
"npc_attack2 004", "npc_attack2 005", "npc_attack2 006" },
vehicle = { "veh_attack2 001", "veh_attack2 002" },
},
chase1 = {
name = "ga_dt3_chase1",
chars = { "npc_chase1 001", "npc_chase1 002" },
vehicle = { "veh_chase1" },
},
chase2 = {
name = "ga_dt3_chase2",
chars = { "npc_chase2 001", "npc_chase2 002" },
vehicle = { "veh_chase2" },
},
chase3 = {
name = "ga_dt3_chase3",
chars = { "npc_chase3 001", "npc_chase3 002" },
vehicle = { "veh_chase3" },
},
chase4 = {
name = "ga_dt3_chase4",
chars = { "npc_chase4 001", "npc_chase4 002" },
vehicle = { "veh_chase4" },
},
chase5 = {
name = "ga_dt3_chase5",
chars = { "npc_chase5 001", "npc_chase5 002" },
vehicle = { "veh_chase5" },
},
chase6 = {
name = "ga_dt3_chase6",
chars = { "npc_chase6 001", "npc_chase6 002" },
vehicle = { "veh_chase6" },
},
chase7 = {
name = "ga_dt3_chase7",
chars = { "npc_chase7 001", "npc_chase7 002" },
vehicle = { "veh_chase7" },
},
chase8 = {
name = "ga_dt3_chase8",
chars = { "npc_chase8 001", "npc_chase8 002" },
vehicle = { "veh_chase8" },
},
chase9 = {
name = "ga_dt3_chase9",
chars = { "npc_chase9 001", "npc_chase9 002" },
vehicle = { "veh_chase9" },
},
chase10 = {
name = "ga_dt3_chase10",
chars = { "npc_chase10 001", "npc_chase10 002" },
vehicle = { "veh_chase10" },
},
chase11 = {
name = "ga_dt3_chase11",
chars = { "npc_chase11 001", "npc_chase11 002" },
vehicle = { "veh_chase11" },
},
chase12 = {
name = "ga_dt3_chase12",
chars = { "npc_chase12 001", "npc_chase12 002" },
vehicle = { "veh_chase12" },
},
chase13 = {
name = "ga_dt3_chase13",
chars = { "npc_chase13 001", "npc_chase13 002" },
vehicle = { "veh_chase13" },
},
chase14 = {
name = "ga_dt3_chase14",
chars = { "npc_chase14 001", "npc_chase14 002" },
vehicle = { "veh_chase14" },
},
chase15 = {
name = "ga_dt3_chase15",
chars = { "npc_chase15 001", "npc_chase15 002" },
vehicle = { "veh_chase15" },
},
chase16 = {
name = "ga_dt3_chase16",
chars = { "npc_chase16 001", "npc_chase16 002" },
vehicle = { "veh_chase16" },
},
chase17 = {
name = "ga_dt3_chase17",
chars = { "npc_chase17 001", "npc_chase17 002" },
vehicle = { "veh_chase17" },
},
chase18 = {
name = "ga_dt3_chase18",
chars = { "npc_chase18 001", "npc_chase18 002" },
vehicle = { "veh_chase18" },
},
chase19 = {
name = "ga_dt3_chase19",
chars = { "npc_chase19 001", "npc_chase19 002" },
vehicle = { "veh_chase19" },
},
chase20 = {
name = "ga_dt3_chase20",
chars = { "npc_chase20 001", "npc_chase20 002" },
vehicle = { "veh_chase20" },
},
chase21 = {
name = "ga_dt3_chase21",
chars = { "npc_chase21 001", "npc_chase21 002" },
vehicle = { "veh_chase21" },
},
attack_heli = {
name = "ga_dt3_attack_heli",
chars = { "npc_attack_heli_pilot", "npc_attack_heli_sniper" },
vehicle = { "veh_attack_heli" },
},
}
-- Navpoints --
_A_GA_DT_03_navs = {
local_rappel_point = "Player_Pos2",
remote_rappel_point = "Coop_Pos2",
camera_pos = "camera_pos",
node3 = "Node 3",
}
-- Paths --
_A_GA_DT_03_paths = {
hover_path = "Hover_Path",
heli_path1a = "Heli1a_Path",
heli_path1b = "Heli1b_Path",
heli_path1c = "Heli1c_Path",
heli_path1d = "Heli1d_Path",
heli_path2a = "Heli2a_Path",
heli_path2b = "Heli2b_Path",
heli_path2c = "Heli2c_Path",
heli_path3 = "Heli3_Path",
heli_path4a = "Heli4a_Path",
heli_path4b = "Heli4b_Path",
heli_path5 = "Heli5_Path",
heli_path6 = "Heli6_Path",
heli_goal_direction = "Heli_End_Orient",
car_path1a = "Car1a_Path",
car_path1b = "Car1b_Path",
car_path1c = "Car1c_Path",
car_path1d = "Car1d_Path",
car_path2a = "Car2a_Path",
car_path2b = "Car2b_Path",
car_path2c = "Car2c_Path",
car_path3 = "Car3_Path",
car_path4a = "Car4a_Path",
car_path4b = "Car4b_Path",
car_path5 = "Car5_Path",
car_path6 = "Car6_Path",
car_path7 = "Car7_Path",
car_path8a = "Car8a_Path",
car_path8b = "Car8b_Path",
car_path8c = "Car8c_Path",
car_path9a = "Car9a_Path",
car_path9b = "Car9b_Path",
car_path9c = "Car9c_Path",
attack_heli = "attack_heli_path",
}
-- Triggers --
-- Characters --
-- Vehicles --
-- Mesh Movers --
-- Text --
-- Threads --
_A_GA_DT_03_threads = {
activity_thread = -1,
driving1_thread = -1,
driving2_thread = -1,
driving3_thread = -1,
flying1_thread = -1,
flying2_thread = -1,
flying3_thread = -1,
intro_chase1_thread = -1,
intro_chase2_thread = -1,
}
-- Checkpoints --
-- Cutscenes --
-- Other --
_A_GA_DT_03_flags = {
activity_thread_complete = false,
driving1_thread_complete = false,
driving2_thread_complete = false,
driving3_thread_complete = false,
flying1_thread_complete = false,
flying2_thread_complete = false,
flying3_thread_complete = false,
indicators_enabled_after_rappel = false,
}
_A_GA_DT_03_chase = {
section_01 = {
vehicle_path = "",
heli_path = "",
use_navmesh = true,
},
}
-- *************************
--
-- Required Functions
--
-- *************************
-- These functions are required for the activity to run correctly.
-- They can be customized but they should function as outlined in the comments.
-- This is called during the activity setup. This should be used to spawn any required
-- script_groups/npcs/vehicles or other required setup the lua will require later.
-- CALLED FROM CODE
--
-- level_num = The level to start for this instance of guardian angel.
--
function _A_GA_DT_03_start(level_num)
-- Handle any initialization
if (level_num == 1) then
-- Handle starting up level 1 for this activity instance
_A_GA_DT_03_start_lvl_1()
end
end
-- This is the primary function responsible for cleaning up the entire activity
-- CALLED FROM CODE
--
function _A_GA_DT_03_cleanup( )
guardian_angel_clear_zone_pinning()
-- Handle any cleanup
if (group_is_loaded(_A_GA_DT_03_groups.heli_group.name))then
group_destroy(_A_GA_DT_03_groups.heli_group.name)
end
if (group_is_loaded(_A_GA_DT_03_groups.roadblock1.name))then
group_destroy(_A_GA_DT_03_groups.roadblock1.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.roadblock1.name)
end
if (group_is_loaded(_A_GA_DT_03_groups.roadblock2.name))then
group_destroy(_A_GA_DT_03_groups.roadblock2.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.roadblock2.name)
end
if (group_is_loaded(_A_GA_DT_03_groups.chase1.name))then
group_destroy(_A_GA_DT_03_groups.chase1.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase1.name)
end
if (group_is_loaded(_A_GA_DT_03_groups.chase2.name))then
group_destroy(_A_GA_DT_03_groups.chase2.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase2.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase3.name))then
group_destroy(_A_GA_DT_03_groups.chase3.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase3.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase4.name))then
group_destroy(_A_GA_DT_03_groups.chase4.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase4.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase5.name))then
group_destroy(_A_GA_DT_03_groups.chase5.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase5.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase6.name))then
group_destroy(_A_GA_DT_03_groups.chase6.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase6.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase7.name))then
group_destroy(_A_GA_DT_03_groups.chase7.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase7.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase8.name))then
group_destroy(_A_GA_DT_03_groups.chase8.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase8.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase9.name))then
group_destroy(_A_GA_DT_03_groups.chase9.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase9.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase10.name))then
group_destroy(_A_GA_DT_03_groups.chase10.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase10.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase11.name))then
group_destroy(_A_GA_DT_03_groups.chase11.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase11.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase12.name))then
group_destroy(_A_GA_DT_03_groups.chase12.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase12.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase13.name))then
group_destroy(_A_GA_DT_03_groups.chase13.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase13.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase14.name))then
group_destroy(_A_GA_DT_03_groups.chase14.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase14.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase15.name))then
group_destroy(_A_GA_DT_03_groups.chase15.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase15.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase16.name))then
group_destroy(_A_GA_DT_03_groups.chase16.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase16.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase17.name))then
group_destroy(_A_GA_DT_03_groups.chase17.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase17.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase18.name))then
group_destroy(_A_GA_DT_03_groups.chase18.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase18.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase19.name))then
group_destroy(_A_GA_DT_03_groups.chase19.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase19.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase20.name))then
group_destroy(_A_GA_DT_03_groups.chase20.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase20.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.chase21.name))then
group_destroy(_A_GA_DT_03_groups.chase21.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.chase21.name)
end
if(group_is_loaded(_A_GA_DT_03_groups.attack_heli.name))then
group_destroy(_A_GA_DT_03_groups.attack_heli.name)
guardian_angel_unregister_script_group(_A_GA_DT_03_groups.attack_heli.name)
end
-- Cleanup any existing threads.
for i, thread in pairs(_A_GA_DT_03_threads) do
if ((thread ~= -1) and (thread_check_done(thread) == false)) then
thread_kill(thread)
end
end
helicopters_set_jitter_override()
on_vehicle_destroyed("", _A_GA_DT_03_groups.protectees.vehicle)
end
-- *************************
--
-- Callback functions
--
-- *************************
--
-- Lua processing start - These are the functions you reference in the table file to
-- start scripting.
--
-- Called from code to start lua processing.
-- IMPORTANT: This should only call the "main" function as a new thread and immediately
-- return true. Doing anything else will break the activity.
--
function _A_GA_DT_03_start_instance()
-- Kick off a thread to process the entire car chase sequence
_A_GA_DT_03_threads.activity_thread = thread_new("_A_GA_DT_03_thread_process_activity")
-- Return true so the activity can continue
return true
end
--
-- Progress Checks - These are how the activity instance knows if lua is complete.
-- Whenever a thread completes, it should mark a bool in
-- _A_GA_DT_03_flags to true. These functions
-- should only return that bool, as anything else could hold
-- up processing.
--
-- Called from code to check if the chase seqeunce has completed
-- IMPORTANT: Do nothing but return the bool that contains the status you are checking.
-- The activity may get held up otherwise.
--
function _A_GA_DT_03_lua_complete()
return _A_GA_DT_03_flags.activity_thread_complete
end
--************** Everything from here up should be copied for every GA lua file. **************--
-- Place any custom functions here for activity processing.
-- *************************
--
-- Thread functions
--
-- *************************
-- Each of these functions are called inside a thread_new("")
-- This is called by _A_GA_DT_03_start_instance() in a new thread.
-- This is responsible for starting scripting. It should run until all functions
-- it calls are complete, and then mark the bool that it has completed.
--
function _A_GA_DT_03_thread_process_activity()
inv_weapon_disable_all_but_this_slot(_A_GA_DT_03_tweak_params.rpg_weapon_slot)
-- Set up hovering
npc_suppress_persona(_A_GA_DT_03_groups.heli_group.chars[1], true)
set_unrecruitable_flag(_A_GA_DT_03_groups.heli_group.chars[1], true)
helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.hover_path)
helicopter_set_max_bank_angle(_A_GA_DT_03_groups.heli_group.vehicle, 9)
helicopters_set_jitter_override(0.1, 0.1)
radio_block(_A_GA_DT_03_groups.heli_group.vehicle)
vehicle_suppress_flipping(_A_GA_DT_03_groups.heli_group.vehicle, true)
vehicle_prevent_explosion_fling(_A_GA_DT_03_groups.heli_group.vehicle, true)
vehicle_infinite_mass(_A_GA_DT_03_groups.heli_group.vehicle, true)
set_dont_attack_me_on_sight_flag(_A_GA_DT_03_groups.heli_group.chars[1], true)
-- Put Pierce in Car
_A_GA_DT_03_PutPierceInCar()
-- Set Pierce as the target
character_make_priority_target(_A_GA_DT_03_groups.protectees.chars[1], true)
--delay(2.0)
-- Set off driving thread
_A_GA_DT_03_threads.flying1_thread = thread_new("_A_GA_DT_03_thread_fly_to_node1")
_A_GA_DT_03_threads.driving1_thread = thread_new("_A_GA_DT_03_thread_drive_to_node1")
-- Fly to Node 1
--_A_GA_DT_03_HeliToNode1()
--_A_GA_DT_03_CarToNode1()
-- Wait for a bit
while not (_A_GA_DT_03_flags.driving1_thread_complete and _A_GA_DT_03_flags.flying1_thread_complete)do
thread_yield()
end
-- delay(3.0)
-- Spawn second roadblock
if not(group_is_loaded(_A_GA_DT_03_groups.roadblock2.name))then
group_create(_A_GA_DT_03_groups.roadblock2.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.roadblock2.name)
end
-- Second driving thread
_A_GA_DT_03_threads.flying2_thread = thread_new("_A_GA_DT_03_thread_fly_to_node2")
_A_GA_DT_03_threads.driving2_thread = thread_new("_A_GA_DT_03_thread_drive_to_node2")
-- Set up chase
_A_GA_DT_03_SetupChase2()
-- Move to Node 2
while not (_A_GA_DT_03_flags.driving2_thread_complete and _A_GA_DT_03_flags.flying2_thread_complete)do
thread_yield()
end
-- Wait for a bit
--delay(5.0)
-- Third driving thread
_A_GA_DT_03_threads.flying3_thread = thread_new("_A_GA_DT_03_thread_fly_to_node3")
_A_GA_DT_03_threads.driving3_thread = thread_new("_A_GA_DT_03_thread_drive_to_node3")
-- Set up chase
_A_GA_DT_03_SetupChase3()
while not (_A_GA_DT_03_flags.driving3_thread_complete and _A_GA_DT_03_flags.flying3_thread_complete)do
if (not _A_GA_DT_03_flags.indicators_enabled_after_rappel and is_rappelling(LOCAL_PLAYER)) then
guardian_angel_enable_indicators(true)
_A_GA_DT_03_flags.indicators_enabled_after_rappel = true
end
thread_yield()
end
--Wait for the player to actually be IN rappel mode and re-enable the indicators
if (not _A_GA_DT_03_flags.indicators_enabled_after_rappel) then
while (not is_rappelling(LOCAL_PLAYER)) do
thread_yield()
end
guardian_angel_enable_indicators(true)
end
_A_GA_DT_03_flags.activity_thread_complete = true
_A_GA_DT_03_threads.activity_thread = -1
end
-- Drive to Node 1
function _A_GA_DT_03_thread_drive_to_node1()
_A_GA_DT_03_CarToNode1()
vehicle_speed_cancel(_A_GA_DT_03_groups.protectees.vehicle)
vehicle_stop(_A_GA_DT_03_groups.protectees.vehicle)
-- Wait until roadblock is dead
while (true) do
local all_chars_dead = true
for i = 1, #(_A_GA_DT_03_groups.roadblock1.chars), 1 do
if (not character_is_dead(_A_GA_DT_03_groups.roadblock1.chars[i])) then
all_chars_dead = false
break
end
end
if (all_chars_dead) then
break
end
delay(0.5)
end
_A_GA_DT_03_flags.driving1_thread_complete = true
_A_GA_DT_03_threads.driving1_thread = -1
end
-- Fly to Node 1
function _A_GA_DT_03_thread_fly_to_node1()
_A_GA_DT_03_HeliToNode1()
_A_GA_DT_03_flags.flying1_thread_complete = true
_A_GA_DT_03_threads.flying1_thread = -1
end
-- Drive to Node 2
function _A_GA_DT_03_thread_drive_to_node2()
_A_GA_DT_03_CarToNode2()
vehicle_speed_cancel(_A_GA_DT_03_groups.protectees.vehicle)
vehicle_stop(_A_GA_DT_03_groups.protectees.vehicle)
-- Wait until roadblock is dead
while (true) do
local all_chars_dead = true
for i = 1, #(_A_GA_DT_03_groups.roadblock2.chars), 1 do
if (not character_is_dead(_A_GA_DT_03_groups.roadblock2.chars[i])) then
all_chars_dead = false
break
end
end
if (all_chars_dead) then
break
end
delay(0.5)
end
_A_GA_DT_03_flags.driving2_thread_complete = true
_A_GA_DT_03_threads.driving2_thread = -1
end
-- Fly to Node 2
function _A_GA_DT_03_thread_fly_to_node2()
_A_GA_DT_03_HeliToNode2()
_A_GA_DT_03_flags.flying2_thread_complete = true
_A_GA_DT_03_threads.flying2_thread = -1
end
-- Drive to Node 3
function _A_GA_DT_03_thread_drive_to_node3()
_A_GA_DT_03_CarToNode3()
_A_GA_DT_03_flags.driving3_thread_complete = true
_A_GA_DT_03_threads.driving3_thread = -1
end
-- Fly to Node 3
function _A_GA_DT_03_thread_fly_to_node3()
guardian_angel_enable_indicators(false)
_A_GA_DT_03_HeliToNode3()
_A_GA_DT_03_heli_exit()
_A_GA_DT_03_flags.flying3_thread_complete = true
_A_GA_DT_03_threads.flying3_thread = -1
end
-- *************************
--
-- Local functions
--
-- *************************
-- This is called by _A_GA_DT_03_start(level_num) and handles setup for
-- the level 1 instance.
--
function _A_GA_DT_03_start_lvl_1()
-- Create the first road block
if not(group_is_loaded(_A_GA_DT_03_groups.roadblock1.name))then
group_create(_A_GA_DT_03_groups.roadblock1.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.roadblock1.name)
end
end
-- Function to get the players out of the helicopter and into rappelling mode
function _A_GA_DT_03_heli_exit()
if(coop_is_active() == true)then
vehicle_exit_guardian_angel(REMOTE_PLAYER)
if not(is_rappelling(REMOTE_PLAYER)) then
rappel_enter(REMOTE_PLAYER, true, _A_GA_DT_03_navs.remote_rappel_point, _A_GA_DT_03_tweak_params.sniper_weapon_slot)
end
end
vehicle_exit_guardian_angel(LOCAL_PLAYER)
if not(is_rappelling(LOCAL_PLAYER))then
rappel_enter(LOCAL_PLAYER, true, _A_GA_DT_03_navs.local_rappel_point, _A_GA_DT_03_tweak_params.sniper_weapon_slot)
end
camera_restrict_set_limits(-25, 20, -30, 30)
camera_restrict_target_object(_A_GA_DT_03_navs.camera_pos)
camera_restrict_set_active(ENABLE)
end
-- Move the helicopter to Node 1
function _A_GA_DT_03_HeliToNode1()
-- Fly along a path
helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_DT_03_groups.protectees.vehicle)
helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path1a, 15)
helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_FACE_ALONG_PATH)
helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path1b, 5)
helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path1c, 5)
helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_DT_03_groups.roadblock2.vehicle[1])
helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path1d, 10)
helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path2a, 15)
helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path2b, 15)
helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path2c, 15)
helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path3, 10)
-- helicopter_fly_to_direct_follow_dont_stop(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.heli_path4, 25)
--helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path1)
--helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path2)
--helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path3)
helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path4a)
helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_DT_03_groups.roadblock1.vehicle[1])
helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path4b)
end
-- Move the helicopter to Node 2
function _A_GA_DT_03_HeliToNode2()
helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_DT_03_groups.roadblock2.vehicle[1])
helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path5)
end
-- Move the helicopter to Node 3 - Rappelling building
function _A_GA_DT_03_HeliToNode3()
guardian_angel_start_zone_pinning("AcrossWater")
-- Fly to directly above the landing point
helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_RIGHT_SIDE_FACE_TARGT, _A_GA_DT_03_groups.protectees.vehicle)
helicopter_fly_to_direct(_A_GA_DT_03_groups.heli_group.vehicle, -1, _A_GA_DT_03_paths.heli_path6)
-- Orient correctly and give it enough time to complete
helicopter_fly_to_set_goal_direction(_A_GA_DT_03_groups.heli_group.vehicle, _A_GA_DT_03_paths.heli_goal_direction, true)
delay(2.0)
-- Tell the helicopter to land and give it enough time to complete
helicopter_set_path_orientation(_A_GA_DT_03_groups.heli_group.vehicle, HELI_PF_FACE_ALONG_PATH)
helicopter_fly_to_do(_A_GA_DT_03_groups.heli_group.vehicle, 3.0, true, "", false, _A_GA_DT_03_paths.heli_goal_direction)
delay(4.0)
end
-- Move Pierce to Node 1
function _A_GA_DT_03_CarToNode1()
-- Set up intro chase
_A_GA_DT_03_threads.intro_chase1_thread = thread_new("_A_GA_DT_03_SetupIntroChase1")
npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], false)
audio_play_persona_line(_A_GA_DT_03_groups.protectees.chars[1], "GA_DT01_Get_in_Cars_01")
npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], true)
-- Pathfind through first spline
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path1a, true, false)
-- Set off thread for the attack heli
-- thread_new("_A_GA_DT_03_Attack_Heli")
vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 25)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path1b, true, false)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path1c, true, false)
vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 35)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path1d, true, false)
-- Set up second intro chase
_A_GA_DT_03_threads.intro_chase2_thread = thread_new("_A_GA_DT_03_SetupIntroChase2")
-- Increment the progress bar
guardian_angel_increment_node_progress()
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path2a, true, false)
vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 35)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path2b, true, false)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path2c, true, false)
-- Increment the progress bar
guardian_angel_increment_node_progress()
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path3, true, true)
-- Increment the progress bar
guardian_angel_increment_node_progress()
vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 35)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path4a, true, true)
npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], false)
audio_play_persona_line(_A_GA_DT_03_groups.protectees.chars[1], "GA_DT01_First_Roadblock")
npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], true)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path4b, true, true)
-- Increment the progress bar
guardian_angel_increment_node_progress()
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path5, true, true)
-- Increment the progress bar
guardian_angel_increment_node_progress()
end
-- Move Pierce to Node 2
function _A_GA_DT_03_CarToNode2()
npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], false)
audio_play_persona_line(_A_GA_DT_03_groups.protectees.chars[1], "GA_DT01_Second_Roadblock")
npc_suppress_persona(_A_GA_DT_03_groups.protectees.chars[1], true)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path6, true)
-- Increment the progress bar
guardian_angel_increment_node_progress()
end
-- Move Pierce to Node 3
function _A_GA_DT_03_CarToNode3()
local convo_handle = audio_conversation_load("_A_GA_DT_03_Cross_Bridge")
audio_conversation_play(convo_handle)
-- start ignoring other traffic - just bash through - keeps him from driving off the bridge
vehicle_ignore_repulsors( _A_GA_DT_03_groups.protectees.vehicle, true )
--vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 35)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path7, true, false)
-- Increment the progress bar
guardian_angel_increment_node_progress()
--delay(1.0)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path8a, true, false)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path8b, true, false)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path8c, true, false)
-- Increment the progress bar
guardian_angel_increment_node_progress()
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path9a, true)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path9b, true)
vehicle_pathfind_to(_A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.car_path9c, true)
-- Increment the progress bar
guardian_angel_increment_node_progress()
if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase1.vehicle[1])then
vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase1.vehicle[1], false)
end
if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase2.vehicle[1])then
vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase2.vehicle[1], false)
end
if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase3.vehicle[1])then
vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase3.vehicle[1], false)
end
if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase4.vehicle[1])then
vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase4.vehicle[1], false)
end
if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase5.vehicle[1])then
vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase5.vehicle[1], false)
end
if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase6.vehicle[1])then
vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase6.vehicle[1], false)
end
if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase7.vehicle[1])then
vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase7.vehicle[1], false)
end
if not vehicle_is_destroyed(_A_GA_DT_03_groups.chase8.vehicle[1])then
vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase8.vehicle[1], false)
end
-- Get Pierce out of the car
delay(5.0)
turn_vulnerable(_A_GA_DT_03_groups.protectees.chars[1])
on_vehicle_destroyed("", _A_GA_DT_03_groups.protectees.vehicle)
vehicle_exit(_A_GA_DT_03_groups.protectees.chars[1], true)
end
function _A_GA_DT_03_SetupChase1()
if not(group_is_loaded(_A_GA_DT_03_groups.chase1.name))then
group_create(_A_GA_DT_03_groups.chase1.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase1.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase2.name))then
group_create(_A_GA_DT_03_groups.chase2.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase2.name)
end
vehicle_enter_teleport(_A_GA_DT_03_groups.chase1.chars[1], _A_GA_DT_03_groups.chase1.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase1.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase1.chars[2], _A_GA_DT_03_groups.chase1.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase1.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase2.chars[1], _A_GA_DT_03_groups.chase2.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase2.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase2.chars[2], _A_GA_DT_03_groups.chase2.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase2.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
-- Wait for people to be in the car
-- while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase1.chars[1], _A_GA_DT_03_groups.chase1.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase1.chars[2], _A_GA_DT_03_groups.chase1.vehicle[1]))do
-- thread_yield()
-- end
-- while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase2.chars[1], _A_GA_DT_03_groups.chase2.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase2.chars[2], _A_GA_DT_03_groups.chase2.vehicle[1]))do
-- thread_yield()
-- end
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase1.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase2.vehicle[1], true)
vehicle_chase(_A_GA_DT_03_groups.chase1.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(4.0)
vehicle_chase(_A_GA_DT_03_groups.chase2.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
end
function _A_GA_DT_03_SetupChase2()
if not(group_is_loaded(_A_GA_DT_03_groups.chase3.name))then
group_create(_A_GA_DT_03_groups.chase3.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase3.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase4.name))then
group_create(_A_GA_DT_03_groups.chase4.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase4.name)
end
vehicle_enter_teleport(_A_GA_DT_03_groups.chase3.chars[1], _A_GA_DT_03_groups.chase3.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase3.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase3.chars[2], _A_GA_DT_03_groups.chase3.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase3.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase4.chars[1], _A_GA_DT_03_groups.chase4.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase4.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase4.chars[2], _A_GA_DT_03_groups.chase4.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase4.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
-- Wait for people to be in the car
-- while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase3.chars[1], _A_GA_DT_03_groups.chase3.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase3.chars[2], _A_GA_DT_03_groups.chase3.vehicle[1]))do
-- thread_yield()
-- end
-- while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase4.chars[1], _A_GA_DT_03_groups.chase4.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase4.chars[2], _A_GA_DT_03_groups.chase4.vehicle[1]))do
-- thread_yield()
-- end
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase3.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase4.vehicle[1], true)
vehicle_chase(_A_GA_DT_03_groups.chase3.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
vehicle_chase(_A_GA_DT_03_groups.chase4.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
end
function _A_GA_DT_03_SetupChase3()
if not(group_is_loaded(_A_GA_DT_03_groups.chase5.name))then
group_create(_A_GA_DT_03_groups.chase5.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase5.name)
end
--[[
if not(group_is_loaded(_A_GA_DT_03_groups.chase6.name))then
group_create(_A_GA_DT_03_groups.chase6.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase6.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase7.name))then
group_create(_A_GA_DT_03_groups.chase7.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase7.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase8.name))then
group_create(_A_GA_DT_03_groups.chase8.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase8.name)
end
]]--
vehicle_enter_teleport(_A_GA_DT_03_groups.chase5.chars[1], _A_GA_DT_03_groups.chase5.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase5.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase5.chars[2], _A_GA_DT_03_groups.chase5.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase5.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
--[[
vehicle_enter_teleport(_A_GA_DT_03_groups.chase6.chars[1], _A_GA_DT_03_groups.chase6.vehicle[1], 0, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase6.chars[2], _A_GA_DT_03_groups.chase6.vehicle[1], 1, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase7.chars[1], _A_GA_DT_03_groups.chase7.vehicle[1], 0, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase7.chars[2], _A_GA_DT_03_groups.chase7.vehicle[1], 1, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase8.chars[1], _A_GA_DT_03_groups.chase8.vehicle[1], 0, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase8.chars[2], _A_GA_DT_03_groups.chase8.vehicle[1], 1, true)
]]--
-- Wait for people to be in the car
-- while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase5.chars[1], _A_GA_DT_03_groups.chase5.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase5.chars[2], _A_GA_DT_03_groups.chase5.vehicle[1]))do
-- thread_yield()
-- end
-- while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase6.chars[1], _A_GA_DT_03_groups.chase6.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase6.chars[2], _A_GA_DT_03_groups.chase6.vehicle[1]))do
-- thread_yield()
-- end
-- while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase7.chars[1], _A_GA_DT_03_groups.chase7.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase7.chars[2], _A_GA_DT_03_groups.chase7.vehicle[1]))do
-- thread_yield()
-- end
-- while not (character_is_in_vehicle(_A_GA_DT_03_groups.chase8.chars[1], _A_GA_DT_03_groups.chase8.vehicle[1]) and character_is_in_vehicle(_A_GA_DT_03_groups.chase8.chars[2], _A_GA_DT_03_groups.chase8.vehicle[1]))do
-- thread_yield()
-- end
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase5.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase6.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase7.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase8.vehicle[1], true)
vehicle_chase(_A_GA_DT_03_groups.chase5.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
--[[
vehicle_chase(_A_GA_DT_03_groups.chase6.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
vehicle_chase(_A_GA_DT_03_groups.chase7.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
vehicle_chase(_A_GA_DT_03_groups.chase8.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
--]]
end
function _A_GA_DT_03_PutPierceInCar()
on_vehicle_destroyed("_A_GA_DT_03_Car_Killed", _A_GA_DT_03_groups.protectees.vehicle)
npc_leash_remove(_A_GA_DT_03_groups.protectees.chars[1])
-- Have Pierce run to car and get into it
--vehicle_enter_do(_A_GA_DT_03_groups.protectees.chars[1], _A_GA_DT_03_groups.protectees.vehicle, false, 0, false)
vehicle_enter_teleport(_A_GA_DT_03_groups.protectees.chars[1], _A_GA_DT_03_groups.protectees.vehicle, 0, true)
vehicle_suppress_npc_exit(_A_GA_DT_03_groups.protectees.vehicle, true)
vehicle_suppress_flipping(_A_GA_DT_03_groups.protectees.vehicle, true)
vehicle_prevent_explosion_fling(_A_GA_DT_03_groups.protectees.vehicle, true)
vehicle_infinite_mass(_A_GA_DT_03_groups.protectees.vehicle, true)
while not(character_is_in_vehicle(_A_GA_DT_03_groups.protectees.chars[1], _A_GA_DT_03_groups.protectees.vehicle))do
thread_yield()
end
set_unjackable_flag(_A_GA_DT_03_groups.protectees.vehicle, true)
turn_invulnerable(_A_GA_DT_03_groups.protectees.chars[1])
vehicle_speed_override(_A_GA_DT_03_groups.protectees.vehicle, 25)
delay(2.0)
end
function _A_GA_DT_03_SetupIntroChase1()
if not(group_is_loaded(_A_GA_DT_03_groups.chase9.name))then
group_create(_A_GA_DT_03_groups.chase9.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase9.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase10.name))then
group_create(_A_GA_DT_03_groups.chase10.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase10.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase11.name))then
group_create(_A_GA_DT_03_groups.chase11.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase11.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase12.name))then
group_create(_A_GA_DT_03_groups.chase12.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase12.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase13.name))then
group_create(_A_GA_DT_03_groups.chase13.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase13.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase14.name))then
group_create(_A_GA_DT_03_groups.chase14.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase14.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase15.name))then
group_create(_A_GA_DT_03_groups.chase15.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase15.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase16.name))then
group_create(_A_GA_DT_03_groups.chase16.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase16.name)
end
vehicle_enter_teleport(_A_GA_DT_03_groups.chase9.chars[1], _A_GA_DT_03_groups.chase9.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase9.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase9.chars[2], _A_GA_DT_03_groups.chase9.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase9.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase10.chars[1], _A_GA_DT_03_groups.chase10.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase10.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase10.chars[2], _A_GA_DT_03_groups.chase10.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase10.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase11.chars[1], _A_GA_DT_03_groups.chase11.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase11.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase11.chars[2], _A_GA_DT_03_groups.chase11.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase11.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase12.chars[1], _A_GA_DT_03_groups.chase12.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase12.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase12.chars[2], _A_GA_DT_03_groups.chase12.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase12.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase13.chars[1], _A_GA_DT_03_groups.chase13.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase13.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase13.chars[2], _A_GA_DT_03_groups.chase13.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase13.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase14.chars[1], _A_GA_DT_03_groups.chase14.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase14.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase14.chars[2], _A_GA_DT_03_groups.chase14.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase14.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase15.chars[1], _A_GA_DT_03_groups.chase15.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase15.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase15.chars[2], _A_GA_DT_03_groups.chase15.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase15.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase16.chars[1], _A_GA_DT_03_groups.chase16.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase16.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase16.chars[2], _A_GA_DT_03_groups.chase16.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase16.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase9.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase10.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase11.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase12.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase13.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase14.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase15.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase16.vehicle[1], true)
-- Have enemies chase after Pierce, put some delays in to make it more interesting
vehicle_chase(_A_GA_DT_03_groups.chase9.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(4)
vehicle_chase(_A_GA_DT_03_groups.chase10.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(5)
vehicle_chase(_A_GA_DT_03_groups.chase11.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(5)
vehicle_chase(_A_GA_DT_03_groups.chase12.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(5)
vehicle_chase(_A_GA_DT_03_groups.chase13.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(5)
vehicle_chase(_A_GA_DT_03_groups.chase14.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(4)
vehicle_chase(_A_GA_DT_03_groups.chase15.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(4)
vehicle_chase(_A_GA_DT_03_groups.chase16.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
end
function _A_GA_DT_03_SetupIntroChase2()
if not(group_is_loaded(_A_GA_DT_03_groups.chase17.name))then
group_create(_A_GA_DT_03_groups.chase17.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase17.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase18.name))then
group_create(_A_GA_DT_03_groups.chase18.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase18.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase19.name))then
group_create(_A_GA_DT_03_groups.chase19.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase19.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase20.name))then
group_create(_A_GA_DT_03_groups.chase20.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase20.name)
end
if not(group_is_loaded(_A_GA_DT_03_groups.chase21.name))then
group_create(_A_GA_DT_03_groups.chase21.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.chase21.name)
end
vehicle_enter_teleport(_A_GA_DT_03_groups.chase17.chars[1], _A_GA_DT_03_groups.chase17.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase17.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase17.chars[2], _A_GA_DT_03_groups.chase17.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase17.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase18.chars[1], _A_GA_DT_03_groups.chase18.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase18.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase18.chars[2], _A_GA_DT_03_groups.chase18.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase18.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase19.chars[1], _A_GA_DT_03_groups.chase19.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase19.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase19.chars[2], _A_GA_DT_03_groups.chase19.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase19.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase20.chars[1], _A_GA_DT_03_groups.chase20.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase20.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase20.chars[2], _A_GA_DT_03_groups.chase20.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase20.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase21.chars[1], _A_GA_DT_03_groups.chase21.vehicle[1], 0, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase21.chars[1], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.chase21.chars[2], _A_GA_DT_03_groups.chase21.vehicle[1], 1, true)
-- ai_add_enemy_target(_A_GA_DT_03_groups.chase21.chars[2], _A_GA_DT_03_groups.protectees.chars[1], ATTACK_NOW_NEVER_LOSE, true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase17.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase18.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase19.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase20.vehicle[1], true)
-- vehicle_suppress_npc_exit(_A_GA_DT_03_groups.chase21.vehicle[1], true)
-- Have enemies chase after Pierce, put some delays in to make it more interesting
vehicle_chase(_A_GA_DT_03_groups.chase17.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(4)
vehicle_chase(_A_GA_DT_03_groups.chase18.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(4)
vehicle_chase(_A_GA_DT_03_groups.chase19.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(4)
vehicle_chase(_A_GA_DT_03_groups.chase20.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
delay(4)
vehicle_chase(_A_GA_DT_03_groups.chase21.vehicle[1], _A_GA_DT_03_groups.protectees.chars[1], true, false)
-- Set up chase
_A_GA_DT_03_SetupChase1()
end
function _A_GA_DT_03_Car_Killed()
marker_remove(_A_GA_DT_03_groups.protectees.vehicle)
on_vehicle_destroyed("", _A_GA_DT_03_groups.protectees.vehicle)
character_kill(_A_GA_DT_03_groups.protectees.chars[1], true)
end
function _A_GA_DT_03_Attack_Heli()
if not (group_is_loaded(_A_GA_DT_03_groups.attack_heli.name))then
group_create(_A_GA_DT_03_groups.attack_heli.name, true)
guardian_angel_register_script_group(_A_GA_DT_03_groups.attack_heli.name)
end
vehicle_enter_teleport(_A_GA_DT_03_groups.attack_heli.chars[1], _A_GA_DT_03_groups.attack_heli.vehicle[1], 0, true)
vehicle_enter_teleport(_A_GA_DT_03_groups.attack_heli.chars[2], _A_GA_DT_03_groups.attack_heli.vehicle[1], 2, true)
vehicle_suppress_npc_exit(_A_GA_DT_03_groups.attack_heli.vehicle[1], true)
helicopter_fly_to_direct_follow(_A_GA_DT_03_groups.attack_heli.vehicle[1], -1, _A_GA_DT_03_groups.protectees.vehicle, _A_GA_DT_03_paths.attack_heli, 2)
end