//PRISON CAGE
//CREATED BY: JEDRAS (PL) 
//11.05.2016



PLAYER_PED p1 = (222.5, 240.5, 5.0) 22 180
PLAYER_PED p2 = (224.5, 240.5, 5.0) 22 180
PLAYER_PED p3 = (226.5, 240.5, 5.0) 22 180	
PLAYER_PED p4 = (228.5, 240.5, 5.0) 22 180
PLAYER_PED p5 = (230.5, 240.5, 5.0) 22 180
PLAYER_PED p6 = (232.5, 240.5, 5.0) 22 180

//DECLARE PLAYER 1

CHAR_DATA p1_guard1
CHAR_DATA p1_guard2
CHAR_DATA p1_prison
CHAR_DATA criminal1
CHAR_DATA criminal2
COUNTER p1_start = 1


//DECLARE PLAYER 2

CHAR_DATA p2_guard1
CHAR_DATA p2_guard2
CHAR_DATA p2_prison
CHAR_DATA criminal3
CHAR_DATA criminal4
COUNTER p2_start = 1


//DECLARE PLAYER 3

CHAR_DATA p3_guard1
CHAR_DATA p3_guard2
CHAR_DATA p3_prison
CHAR_DATA criminal5
CHAR_DATA criminal6
COUNTER p3_start = 1


//DECLARE PLAYER 4

CHAR_DATA p4_guard1
CHAR_DATA p4_guard2
CHAR_DATA p4_prison
CHAR_DATA criminal7
CHAR_DATA criminal8
COUNTER p4_start = 1


//DECLARE PLAYER 5

CHAR_DATA p5_guard1
CHAR_DATA p5_guard2
CHAR_DATA p5_prison
CHAR_DATA criminal9
CHAR_DATA criminal10
COUNTER p5_start = 1


//DECLARE PLAYER 6

CHAR_DATA p6_guard1
CHAR_DATA p6_guard2
CHAR_DATA p6_prison
CHAR_DATA criminal11
CHAR_DATA criminal12
COUNTER p6_start = 1

//DECLARE BOTS

CHAR_DATA watchman1
CHAR_DATA watchman2
CHAR_DATA watchman3
CHAR_DATA watchman4
CHAR_DATA watchman5
CHAR_DATA soldier1
CHAR_DATA soldier2
CHAR_DATA soldier3
CHAR_DATA soldier4
CHAR_DATA soldier5
CHAR_DATA soldier6
CHAR_DATA soldier7
CHAR_DATA soldier8
CHAR_DATA prison1
CHAR_DATA prison2
CHAR_DATA prison3
CHAR_DATA prison4
CHAR_DATA prison5
CHAR_DATA prison6
CHAR_DATA prison7
CHAR_DATA prison8
CHAR_DATA prison9
CHAR_DATA prison10
CHAR_DATA prison11
CHAR_DATA prison12
CHAR_DATA prison13
CHAR_DATA prison14
CHAR_DATA prison15
CHAR_DATA prison16
CHAR_DATA prison17
CHAR_DATA prison18
CHAR_DATA prison19
CHAR_DATA prison20
CHAR_DATA prison21
CHAR_DATA prison22
CHAR_DATA prison23
CHAR_DATA prison24
CHAR_DATA criminal13
CHAR_DATA criminal14
CHAR_DATA criminal15
CHAR_DATA criminal16
CHAR_DATA criminal17
CHAR_DATA criminal18
CHAR_DATA criminal19
CHAR_DATA criminal20
CHAR_DATA criminal21
CHAR_DATA criminal22
CHAR_DATA criminal23
CHAR_DATA criminal24
CHAR_DATA criminal25
CHAR_DATA criminal26
CHAR_DATA criminal27
CHAR_DATA criminal28
CHAR_DATA criminal29
CHAR_DATA criminal30
CHAR_DATA criminal31
CHAR_DATA criminal32
CHAR_DATA criminal33
CHAR_DATA criminal34
CHAR_DATA criminal35
CHAR_DATA criminal36
CHAR_DATA guard1
CHAR_DATA guard2
CHAR_DATA guard3
CHAR_DATA guard4

//doors

DECLARE_DOOR_INFO (408, 415, 2)
DOOR_DATA p1_door = SINGLE (222, 238, 5) (222.50, 238.50, 5.00, 1.00, 1.00) BOTTOM 0 ONE_CHAR_ON_FOOT CLOSE_NEVER 0 NOT_FLIPPED NOT_REVERSED
MAKE_DOOR_MANUAL (p1_door)

DECLARE_DOOR_INFO (408, 415, 2)
DOOR_DATA p2_door = SINGLE (224, 238, 5) (224.50, 238.50, 5.00, 1.00, 1.00) BOTTOM 0 ONE_CHAR_ON_FOOT CLOSE_NEVER 0 NOT_FLIPPED NOT_REVERSED
MAKE_DOOR_MANUAL (p2_door)

DECLARE_DOOR_INFO (408, 415, 2)
DOOR_DATA p3_door = SINGLE (226, 238, 5) (226.50, 238.50, 5.00, 1.00, 1.00) BOTTOM 0 ONE_CHAR_ON_FOOT CLOSE_NEVER 0 NOT_FLIPPED NOT_REVERSED
MAKE_DOOR_MANUAL (p3_door)

DECLARE_DOOR_INFO (408, 415, 2)
DOOR_DATA p4_door = SINGLE (228, 238, 5) (228.50, 238.50, 5.00, 1.00, 1.00) BOTTOM 0 ONE_CHAR_ON_FOOT CLOSE_NEVER 0 NOT_FLIPPED NOT_REVERSED
MAKE_DOOR_MANUAL (p4_door)

DECLARE_DOOR_INFO (408, 415, 2)
DOOR_DATA p5_door = SINGLE (230, 238, 5) (230.50, 238.50, 5.00, 1.00, 1.00) BOTTOM 0 ONE_CHAR_ON_FOOT CLOSE_NEVER 0 NOT_FLIPPED NOT_REVERSED
MAKE_DOOR_MANUAL (p5_door)


//LOOPS
COUNTER action = 0
COUNTER cells = 1


//OTHER
GENERATOR health = (130.5, 146.5, 2.0) 0 COLLECT_30 2000 2000 99
GENERATOR fastreload = (129.5, 136.5, 2.0) 0 COLLECT_36 1000 1000 99
SOUND alarm1
SOUND riot = (129.5, 134.5, 4.0) PRISON_RIOT PLAY_FOREVER

//
//
//

LEVELSTART

SWITCH_GENERATOR (health, ON)
SWITCH_GENERATOR (fastreload, ON)
SET_AMBIENT_LEVEL (0.28, 0)


//BOTS

////Attacks Player 1 in chapter 1

p1_guard1 = CREATE_CHAR (225.1, 225.9, 5.0) 0 0 POLICE END
SET_CHAR_SHOOTING_SKILL (p1_guard1, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p1_guard1, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p1_guard1, NO_REACTION)

p1_guard2 = CREATE_CHAR (225.9, 225.1, 5.0) 0 180 POLICE END
SET_CHAR_SHOOTING_SKILL (p1_guard2, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p1_guard2, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p1_guard2, NO_REACTION)

p1_prison = CREATE_CHAR (221.5, 239.5, 5.0) 22 0 REFUGEES END
SET_CHAR_THREAT_REACTION (p1_prison, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (p1_prison, CRACK_SHOT)

criminal1 = CREATE_CHAR (220.5, 232.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal1, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal1, CRACK_SHOT)

criminal2 = CREATE_CHAR (220.5, 231.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal2, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal12, CRACK_SHOT)


////Attacks Player 2 in chapter 1

p2_guard1 = CREATE_CHAR (225.1, 224.9, 5.0) 0 0 POLICE END
SET_CHAR_SHOOTING_SKILL (p2_guard1, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p2_guard1, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p2_guard1, NO_REACTION)

p2_guard2 = CREATE_CHAR (225.9, 224.1, 5.0) 0 180 POLICE END
SET_CHAR_SHOOTING_SKILL (p2_guard2, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p2_guard2, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p2_guard2, NO_REACTION)

p2_prison = CREATE_CHAR (223.5, 239.5, 5.0) 22 0 REFUGEES END
SET_CHAR_THREAT_REACTION (p2_prison, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (p2_prison, CRACK_SHOT)

criminal3 = CREATE_CHAR (219.5, 232.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal3, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal3, CRACK_SHOT)

criminal4 = CREATE_CHAR (219.5, 231.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal4, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal14, CRACK_SHOT)


////Attacks Player 3 in chapter 1

p3_guard1 = CREATE_CHAR (226.1, 225.9, 5.0) 0 0 POLICE END
SET_CHAR_SHOOTING_SKILL (p3_guard1, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p3_guard1, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p3_guard1, NO_REACTION)

p3_guard2 = CREATE_CHAR (226.9, 225.1, 5.0) 0 180 POLICE END
SET_CHAR_SHOOTING_SKILL (p3_guard2, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p3_guard2, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p3_guard2, NO_REACTION)

p3_prison = CREATE_CHAR (225.5, 239.5, 5.0) 22 0 REFUGEES END
SET_CHAR_THREAT_REACTION (p3_prison, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (p3_prison, CRACK_SHOT)

criminal5 = CREATE_CHAR (220.5, 229.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal5, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal5, CRACK_SHOT)

criminal6 = CREATE_CHAR (220.5, 230.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal6, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal16, CRACK_SHOT)


////Attacks Player 4 in chapter 1

p4_guard1 = CREATE_CHAR (226.1, 224.9, 5.0) 0 0 POLICE END
SET_CHAR_SHOOTING_SKILL (p4_guard1, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p4_guard1, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p4_guard1, NO_REACTION)

p4_guard2 = CREATE_CHAR (226.9, 224.1, 5.0) 0 180 POLICE END
SET_CHAR_SHOOTING_SKILL (p4_guard2, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p4_guard2, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p4_guard2, NO_REACTION)

p4_prison = CREATE_CHAR (227.5, 239.5, 5.0) 22 0 REFUGEES END
SET_CHAR_THREAT_REACTION (p4_prison, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (p4_prison, CRACK_SHOT)

criminal7 = CREATE_CHAR (219.5, 229.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal7, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal17, CRACK_SHOT)

criminal8 = CREATE_CHAR (219.5, 230.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal8, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal18, CRACK_SHOT)


////Attacks Player 5 in chapter 1

p5_guard1 = CREATE_CHAR (227.1, 225.9, 5.0) 0 0 POLICE END
SET_CHAR_SHOOTING_SKILL (p5_guard1, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p5_guard1, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p5_guard1, NO_REACTION)

p5_guard2 = CREATE_CHAR (227.9, 225.1, 5.0) 0 180 POLICE END
SET_CHAR_SHOOTING_SKILL (p5_guard2, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p5_guard2, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p5_guard2, NO_REACTION)

p5_prison = CREATE_CHAR (229.5, 239.5, 5.0) 22 0 REFUGEES END
SET_CHAR_THREAT_REACTION (p5_prison, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (p5_prison, CRACK_SHOT)

criminal9 = CREATE_CHAR (220.5, 227.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal9, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal19, CRACK_SHOT)

criminal10 = CREATE_CHAR (220.5, 228.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal10, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal10, CRACK_SHOT)


////Attacks Player 6 in chapter 1

p6_guard1 = CREATE_CHAR (227.1, 224.9, 5.0) 0 0 POLICE END
SET_CHAR_SHOOTING_SKILL (p6_guard1, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p6_guard1, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p6_guard1, NO_REACTION)

p6_guard2 = CREATE_CHAR (227.9, 224.1, 5.0) 0 180 POLICE END
SET_CHAR_SHOOTING_SKILL (p6_guard2, CRACK_SHOT)
SET_CHAR_OBJECTIVE (p6_guard2, WAIT_ON_FOOT)
SET_CHAR_THREAT_REACTION (p6_guard2, NO_REACTION)

p6_prison = CREATE_CHAR (231.5, 239.5, 5.0) 22 0 REFUGEES END
SET_CHAR_THREAT_REACTION (p6_prison, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (p6_prison, CRACK_SHOT)

criminal11 = CREATE_CHAR (219.5, 227.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal11, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal11, CRACK_SHOT)

criminal12 = CREATE_CHAR (219.5, 228.5, 5.0) 22 90 REFUGEES END
SET_CHAR_THREAT_REACTION (criminal12, NO_REACTION)
SET_CHAR_SHOOTING_SKILL (criminal12, CRACK_SHOT)


////Prison team 1

criminal13 = CREATE_CHAR (220.5, 233.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal13, NO_REACTION)

criminal14 = CREATE_CHAR (220.5, 234.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal14, NO_REACTION)

criminal15 = CREATE_CHAR (219.5, 233.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal15, NO_REACTION)

criminal16 = CREATE_CHAR (219.5, 234.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal16, NO_REACTION)

criminal17 = CREATE_CHAR (220.5, 235.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal17, NO_REACTION)

criminal18 = CREATE_CHAR (220.5, 236.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal18, NO_REACTION)

criminal19 = CREATE_CHAR (219.5, 235.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal19, NO_REACTION)

criminal20 = CREATE_CHAR (219.5, 236.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal20, NO_REACTION)

criminal21 = CREATE_CHAR (220.5, 237.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal21, NO_REACTION)

criminal22 = CREATE_CHAR (220.5, 238.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal22, NO_REACTION)

criminal23 = CREATE_CHAR (219.5, 237.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal23, NO_REACTION)

criminal24 = CREATE_CHAR (219.5, 238.5, 5.0) 22 90 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal24, NO_REACTION)

criminal25 = CREATE_CHAR (233.5, 233.5, 5.0) 22 270 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal25, NO_REACTION)

criminal26 = CREATE_CHAR (233.5, 234.5, 5.0) 22 270 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal26, NO_REACTION)

criminal27 = CREATE_CHAR (234.5, 233.5, 5.0) 22 270 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal27, NO_REACTION)

criminal28 = CREATE_CHAR (234.5, 234.5, 5.0) 22 270 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal28, NO_REACTION)

criminal29 = CREATE_CHAR (233.5, 235.5, 5.0) 22 270 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal29, NO_REACTION)

criminal30 = CREATE_CHAR (233.5, 236.5, 5.0) 22 270 FIREMAN END
SET_CHAR_THREAT_REACTION (criminal30, NO_REACTION)


////Prison team 2

criminal31 = CREATE_CHAR (234.5, 235.5, 5.0) 22 270 CRIMINAL END
SET_CHAR_THREAT_REACTION (criminal31, NO_REACTION)

criminal32 = CREATE_CHAR (234.5, 236.5, 5.0) 22 270 CRIMINAL END
SET_CHAR_THREAT_REACTION (criminal32, NO_REACTION)

criminal33 = CREATE_CHAR (233.5, 237.5, 5.0) 22 270 CRIMINAL END
SET_CHAR_THREAT_REACTION (criminal33, NO_REACTION)

criminal34 = CREATE_CHAR (233.5, 238.5, 5.0) 22 270 CRIMINAL END
SET_CHAR_THREAT_REACTION (criminal34, NO_REACTION)

criminal35 = CREATE_CHAR (234.5, 237.5, 5.0) 22 270 CRIMINAL END
SET_CHAR_THREAT_REACTION (criminal35, NO_REACTION)

criminal36 = CREATE_CHAR (234.5, 238.5, 5.0) 22 270 CRIMINAL END
SET_CHAR_THREAT_REACTION (criminal36, NO_REACTION)


////Watchmans on towers
watchman1 = CREATE_CHAR (127.5, 141.5, 5.0) 0 30 POLICE END
SET_CHAR_OBJECTIVE (watchman1, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (watchman1, REACT_AS_NORMAL)

watchman2 = CREATE_CHAR (131.5, 141.5, 5.0) 0 0 POLICE END
SET_CHAR_OBJECTIVE (watchman2, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (watchman2, REACT_AS_NORMAL)

watchman3 = CREATE_CHAR (133.5, 144.5, 5.0) 0 220 POLICE END
SET_CHAR_OBJECTIVE (watchman3, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (watchman3, REACT_AS_NORMAL)

watchman4 = CREATE_CHAR (131.5, 145.5, 5.0) 0 180 POLICE END
SET_CHAR_OBJECTIVE (watchman4, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (watchman4, REACT_AS_NORMAL)

watchman5 = CREATE_CHAR (127.5, 146.5, 5.0) 0 150 POLICE END
SET_CHAR_OBJECTIVE (watchman5, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (watchman5, REACT_AS_NORMAL)


////Protect the passage
soldier1 = CREATE_CHAR (128.5, 137.3, 2.0) 0 270 ARMY END
SET_CHAR_SHOOTING_SKILL (soldier1, CRACK_SHOT)
SET_CHAR_THREAT_SEARCH (soldier1, LINE_OF_SIGHT_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (soldier1, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (soldier1, GUARD_SPOT)
GIVE_WEAPON (soldier1, MACHINE_GUN)

soldier2 = CREATE_CHAR (128.5, 138.3, 2.0) 0 270 ARMY END
SET_CHAR_SHOOTING_SKILL (soldier2, CRACK_SHOT)
SET_CHAR_THREAT_SEARCH (soldier2, LINE_OF_SIGHT_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (soldier2, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (soldier2, GUARD_SPOT)
GIVE_WEAPON (soldier2, MACHINE_GUN)

soldier3 = CREATE_CHAR (128.5, 139.3, 2.0) 0 270 ARMY END
SET_CHAR_SHOOTING_SKILL (soldier3, CRACK_SHOT)
SET_CHAR_THREAT_SEARCH (soldier3, LINE_OF_SIGHT_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (soldier3, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (soldier3, GUARD_SPOT)
GIVE_WEAPON (soldier3, MACHINE_GUN)

soldier4 = CREATE_CHAR (130.5, 137.8, 2.0) 0 270 ARMY END
SET_CHAR_SHOOTING_SKILL (soldier4, CRACK_SHOT)
SET_CHAR_THREAT_SEARCH (soldier4, LINE_OF_SIGHT_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (soldier4, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (soldier4, GUARD_SPOT)
GIVE_WEAPON (soldier4, MACHINE_GUN)

soldier5 = CREATE_CHAR (130.5, 138.8, 2.0) 0 270 ARMY END
SET_CHAR_SHOOTING_SKILL (soldier5, CRACK_SHOT)
SET_CHAR_THREAT_SEARCH (soldier5, LINE_OF_SIGHT_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (soldier5, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (soldier5, GUARD_SPOT)
GIVE_WEAPON (soldier5, MACHINE_GUN)

soldier6 = CREATE_CHAR (130.5, 139.8, 2.0) 0 270 ARMY END
SET_CHAR_SHOOTING_SKILL (soldier6, CRACK_SHOT)
SET_CHAR_THREAT_SEARCH (soldier6, LINE_OF_SIGHT_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (soldier6, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (soldier6, GUARD_SPOT)
GIVE_WEAPON (soldier6, MACHINE_GUN)

soldier7 = CREATE_CHAR (128.5, 140.3, 2.0) 0 270 ARMY END
SET_CHAR_SHOOTING_SKILL (soldier7, CRACK_SHOT)
SET_CHAR_THREAT_SEARCH (soldier7, LINE_OF_SIGHT_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (soldier7, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (soldier7, GUARD_SPOT)
GIVE_WEAPON (soldier7, MACHINE_GUN)

soldier8 = CREATE_CHAR (130.5, 140.8, 2.0) 0 270 ARMY END
SET_CHAR_SHOOTING_SKILL (soldier8, CRACK_SHOT)
SET_CHAR_THREAT_SEARCH (soldier8, LINE_OF_SIGHT_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (soldier8, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE (soldier8, GUARD_SPOT)
GIVE_WEAPON (soldier8, MACHINE_GUN)


////Prisoners on balconies

//////125, 145
prison1 = CREATE_CHAR (125.25, 139.25, 4.0) 22 90 REFUGEES END
SET_CHAR_OBJECTIVE (prison1, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison1, NO_REACTION)

prison2 = CREATE_CHAR (125.75, 139.25, 4.0) 22 90 REFUGEES END
SET_CHAR_OBJECTIVE (prison2, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison2, NO_REACTION)

prison3 = CREATE_CHAR (125.25, 139.75, 4.0) 22 90 REFUGEES END
SET_CHAR_OBJECTIVE (prison3, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison3, NO_REACTION)

prison4 = CREATE_CHAR (125.75, 139.75, 4.0) 22 90 REFUGEES END
SET_CHAR_OBJECTIVE (prison4, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison4, NO_REACTION)

//////125, 144
prison5 = CREATE_CHAR (125.25, 138.25, 4.0) 22 90 REFUGEES END
SET_CHAR_OBJECTIVE (prison5, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison5, NO_REACTION)

prison6 = CREATE_CHAR (125.75, 138.25, 4.0) 22 90 REFUGEES END
SET_CHAR_OBJECTIVE (prison6, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison6, NO_REACTION)

prison7 = CREATE_CHAR (125.25, 138.75, 4.0) 22 90 REFUGEES END
SET_CHAR_OBJECTIVE (prison7, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison7, NO_REACTION)

prison8 = CREATE_CHAR (125.75, 138.75, 4.0) 22 90 REFUGEES END
SET_CHAR_OBJECTIVE (prison8, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison8, NO_REACTION)

//////135, 141
prison9 = CREATE_CHAR (135.25, 141.25, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison9, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison9, NO_REACTION)

prison10 = CREATE_CHAR (135.75, 141.25, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison10, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison10, NO_REACTION)

prison11 = CREATE_CHAR (135.25, 141.75, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison11, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison11, NO_REACTION)

prison12 = CREATE_CHAR (135.75, 141.75, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison12, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison12, NO_REACTION)

//////135, 142
prison13 = CREATE_CHAR (135.25, 142.25, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison13, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison13, NO_REACTION)

prison14 = CREATE_CHAR (135.75, 142.25, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison14, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison14, NO_REACTION)

prison15 = CREATE_CHAR (135.25, 142.75, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison15, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison15, NO_REACTION)

prison16 = CREATE_CHAR (135.75, 142.75, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison16, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison16, NO_REACTION)

//////135, 143
prison17 = CREATE_CHAR (135.25, 143.25, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison17, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison17, NO_REACTION)

prison18 = CREATE_CHAR (135.75, 143.25, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison18, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison18, NO_REACTION)

prison19 = CREATE_CHAR (135.25, 143.75, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison19, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison19, NO_REACTION)

prison20 = CREATE_CHAR (135.75, 143.75, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison20, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison20, NO_REACTION)

//////135, 144
prison21 = CREATE_CHAR (135.25, 144.25, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison21, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison21, NO_REACTION)

prison22 = CREATE_CHAR (135.75, 144.25, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison22, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison22, NO_REACTION)

prison23 = CREATE_CHAR (135.25, 144.75, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison23, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison23, NO_REACTION)

prison24 = CREATE_CHAR (135.75, 144.75, 5.0) 22 270 REFUGEES END
SET_CHAR_OBJECTIVE (prison24, GUARD_SPOT)
SET_CHAR_THREAT_REACTION (prison24, NO_REACTION)

////Guards near prisoners
guard1 = CREATE_CHAR (125.5, 140.5, 4.0) 0 90 REFUGEES END
SET_CHAR_THREAT_REACTION (guard1, NO_REACTION)

guard2 = CREATE_CHAR (125.5, 137.5, 4.0) 0 90 REFUGEES END
SET_CHAR_THREAT_REACTION (guard2, NO_REACTION)

guard3 = CREATE_CHAR (135.5, 140.5, 5.0) 0 270 REFUGEES END
SET_CHAR_THREAT_REACTION (guard3, NO_REACTION)

guard4 = CREATE_CHAR (135.5, 145.5, 5.0) 0 270 REFUGEES END
SET_CHAR_THREAT_REACTION (guard4, NO_REACTION)


WHILE_EXEC (cells=1)

//
//
//


////PLAYER 1
IF (CHECK_CHARACTER_HEALTH(p1, 0)) 
	IF (HAS_CHAR_PUNCHED_SOMEONE (p1))
    		SET p2_start = 0
    		SET p3_start = 0
    		SET p4_start = 0
      		SET p5_start = 0
    		SET p6_start = 0
 	ENDIF

	IF (LOCATE_CHARACTER_ANY_MEANS (p1, 129.5, 142.5, 2.0, 15.0, 15.0))
  		GIVE_WEAPON (p1, ROCKET_LAUNCHER, 99) 
 	ENDIF

   	IF (HAS_CHARACTER_DIED (p1))
      		SET_CHAR_THREAT_REACTION (p1_guard1, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p1_guard1, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p1_guard2, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p1_guard2, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p1_prison, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p1_prison, WAIT_ON_FOOT)
   	ENDIF
ENDIF


////PLAYER 2
IF (CHECK_CHARACTER_HEALTH(p2, 0)) 
	IF (HAS_CHAR_PUNCHED_SOMEONE (p2))
		SET p1_start = 0
    		SET p3_start = 0
      		SET p4_start = 0
      		SET p5_start = 0
	     	SET p6_start = 0
 	ENDIF

	IF (LOCATE_CHARACTER_ANY_MEANS (p2, 129.5, 142.5, 2.0, 15.0, 15.0))
  		GIVE_WEAPON (p2, ROCKET_LAUNCHER, 99) 
 	ENDIF

	IF (HAS_CHARACTER_DIED (p2))
      		SET_CHAR_THREAT_REACTION (p2_guard1, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p2_guard1, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p2_guard2, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p2_guard2, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p2_prison, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p2_prison, WAIT_ON_FOOT)
	ENDIF
ENDIF


////PLAYER 3
IF (CHECK_CHARACTER_HEALTH(p3, 0)) 
	IF (HAS_CHAR_PUNCHED_SOMEONE (p3))
		SET p1_start = 0
    		SET p2_start = 0
      		SET p4_start = 0
      		SET p5_start = 0
	     	SET p6_start = 0
 	ENDIF

	IF (LOCATE_CHARACTER_ANY_MEANS (p3, 129.5, 142.5, 2.0, 15.0, 15.0))
  		GIVE_WEAPON (p3, ROCKET_LAUNCHER, 99) 
 	ENDIF

	IF (HAS_CHARACTER_DIED (p3))
      		SET_CHAR_THREAT_REACTION (p3_guard1, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p3_guard1, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p3_guard2, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p3_guard2, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p3_prison, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p3_prison, WAIT_ON_FOOT)
   	  ENDIF
ENDIF


////PLAYER 4
IF (CHECK_CHARACTER_HEALTH(p4, 0)) 
	IF (HAS_CHAR_PUNCHED_SOMEONE (p4))
		SET p1_start = 0
    		SET p2_start = 0
      		SET p3_start = 0
     		SET p5_start = 0
	    	SET p6_start = 0
 	ENDIF

	IF (LOCATE_CHARACTER_ANY_MEANS (p4, 129.5, 142.5, 2.0, 15.0, 15.0))
  		GIVE_WEAPON (p4, ROCKET_LAUNCHER, 99) 
 	ENDIF

	IF (HAS_CHARACTER_DIED (p4))
      		SET_CHAR_THREAT_REACTION (p4_guard1, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p4_guard1, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p4_guard2, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p4_guard2, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p4_prison, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p4_prison, WAIT_ON_FOOT)
	ENDIF
ENDIF


////PLAYER 5
IF (CHECK_CHARACTER_HEALTH(p5, 0)) 
	IF (HAS_CHAR_PUNCHED_SOMEONE (p5))
		SET p1_start = 0
    		SET p2_start = 0
      		SET p3_start = 0
     	 	SET p4_start = 0
	     	SET p6_start = 0
 	ENDIF

	IF (LOCATE_CHARACTER_ANY_MEANS (p5, 129.5, 142.5, 2.0, 15.0, 15.0))
  		GIVE_WEAPON (p5, ROCKET_LAUNCHER, 99) 
 	ENDIF

	IF (HAS_CHARACTER_DIED (p5))
      		SET_CHAR_THREAT_REACTION (p5_guard1, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p5_guard1, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p5_guard2, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p5_guard2, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p5_prison, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p5_prison, WAIT_ON_FOOT)
	ENDIF
ENDIF


////PLAYER 6
IF (CHECK_CHARACTER_HEALTH(p6, 0)) 
	IF (HAS_CHAR_PUNCHED_SOMEONE (p6))
		SET p1_start = 0
    		SET p2_start = 0
      		SET p3_start = 0
      		SET p4_start = 0
	    	SET p5_start = 0
 	ENDIF

	IF (LOCATE_CHARACTER_ANY_MEANS (p6, 129.5, 142.5, 2.0, 15.0, 15.0))
  		GIVE_WEAPON (p6, ROCKET_LAUNCHER, 99) 
 	ENDIF

	IF (HAS_CHARACTER_DIED (p6))
      		SET_CHAR_THREAT_REACTION (p6_guard1, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p6_guard1, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p6_guard2, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p6_guard2, WAIT_ON_FOOT)
      		SET_CHAR_THREAT_REACTION (p6_prison, NO_REACTION)
      		SET_CHAR_OBJECTIVE (p6_prison, WAIT_ON_FOOT)
	ENDIF
ENDIF

//
//
//

//ACTION AFTER PUNCH

IF ((((((p1_start = 1) AND (p2_start = 0)) AND (p3_start = 0)) AND (p4_start = 0)) AND (p5_start = 0)) AND (p6_start = 0))
	SET action = 1
ENDIF

IF ((((((p1_start = 0) AND (p2_start = 1)) AND (p3_start = 0)) AND (p4_start = 0)) AND (p5_start = 0)) AND (p6_start = 0))
	SET action = 1
ENDIF

IF ((((((p1_start = 0) AND (p2_start = 0)) AND (p3_start = 1)) AND (p4_start = 0)) AND (p5_start = 0)) AND (p6_start = 0))
	SET action = 1
ENDIF

IF ((((((p1_start = 0) AND (p2_start = 0)) AND (p3_start = 0)) AND (p4_start = 1)) AND (p5_start = 0)) AND (p6_start = 0))
	SET action = 1
ENDIF

IF ((((((p1_start = 0) AND (p2_start = 0)) AND (p3_start = 0)) AND (p4_start = 0)) AND (p5_start = 1)) AND (p6_start = 0))
	SET action = 1
ENDIF

IF ((((((p1_start = 0) AND (p2_start = 0)) AND (p3_start = 0)) AND (p4_start = 0)) AND (p5_start = 0)) AND (p6_start = 1))
	SET action = 1
ENDIF

IF (action = 1)
	IF (CHECK_CHARACTER_HEALTH(p1, 0))
		SET_CHAR_OBJECTIVE (p1_guard1, GOTO_AREA_ON_FOOT, 222.5, 240.5, 5.0)
        	SET_CHAR_OBJECTIVE (p1_guard2, GOTO_AREA_ON_FOOT, 222.5, 240.5, 5.0)
        	SET_CHAR_THREAT_REACTION (p1_prison, REACT_AS_NORMAL)
      		SET_CHAR_THREAT_REACTION (p1_guard2, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_REACTION (p1_guard1, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_SEARCH (p1_guard1, AREA_PLAYER_ONLY)
        	SET_CHAR_THREAT_SEARCH (p1_guard2, AREA_PLAYER_ONLY)
		SET_CHAR_OBJECTIVE (p1_guard1, KILL_CHAR_ON_FOOT, p1)
       		SET_CHAR_OBJECTIVE (p1_guard2, KILL_CHAR_ON_FOOT, p1)
        	SET_CHAR_OBJECTIVE (criminal1, KILL_CHAR_ON_FOOT, p1)
        	SET_CHAR_OBJECTIVE (criminal2, KILL_CHAR_ON_FOOT, p1)
  		SET_CHAR_OBJECTIVE (p1_prison, KILL_CHAR_ON_FOOT, p1)
	ENDIF

	IF (CHECK_CHARACTER_HEALTH(p2, 0))
		SET_CHAR_OBJECTIVE (p2_guard1, GOTO_AREA_ON_FOOT, 224.5, 240.5, 5.0)
        	SET_CHAR_OBJECTIVE (p2_guard2, GOTO_AREA_ON_FOOT, 224.5, 240.5, 5.0)
        	SET_CHAR_THREAT_REACTION (p2_prison, REACT_AS_NORMAL)
      		SET_CHAR_THREAT_REACTION (p2_guard2, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_REACTION (p2_guard1, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_SEARCH (p2_guard1, AREA_PLAYER_ONLY)
        	SET_CHAR_THREAT_SEARCH (p2_guard2, AREA_PLAYER_ONLY)
		SET_CHAR_OBJECTIVE (p2_guard1, KILL_CHAR_ON_FOOT, p2)
       		SET_CHAR_OBJECTIVE (p2_guard2, KILL_CHAR_ON_FOOT, p2)
        	SET_CHAR_OBJECTIVE (criminal3, KILL_CHAR_ON_FOOT, p2)
        	SET_CHAR_OBJECTIVE (criminal4, KILL_CHAR_ON_FOOT, p2)
  		SET_CHAR_OBJECTIVE (p2_prison, KILL_CHAR_ON_FOOT, p2)
	ENDIF
 
 	IF (CHECK_CHARACTER_HEALTH(p3, 0))
		SET_CHAR_OBJECTIVE (p3_guard1, GOTO_AREA_ON_FOOT, 226.5, 240.5, 5.0)
        	SET_CHAR_OBJECTIVE (p3_guard2, GOTO_AREA_ON_FOOT, 226.5, 240.5, 5.0)
        	SET_CHAR_THREAT_REACTION (p3_prison, REACT_AS_NORMAL)
      		SET_CHAR_THREAT_REACTION (p3_guard2, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_REACTION (p3_guard1, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_SEARCH (p3_guard1, AREA_PLAYER_ONLY)
        	SET_CHAR_THREAT_SEARCH (p3_guard2, AREA_PLAYER_ONLY)
		SET_CHAR_OBJECTIVE (p3_guard1, KILL_CHAR_ON_FOOT, p3)
       		SET_CHAR_OBJECTIVE (p3_guard2, KILL_CHAR_ON_FOOT, p3)
        	SET_CHAR_OBJECTIVE (criminal5, KILL_CHAR_ON_FOOT, p3)
        	SET_CHAR_OBJECTIVE (criminal6, KILL_CHAR_ON_FOOT, p3)
  		SET_CHAR_OBJECTIVE (p3_prison, KILL_CHAR_ON_FOOT, p3)
	ENDIF
 
 	IF (CHECK_CHARACTER_HEALTH(p4, 0))
		SET_CHAR_OBJECTIVE (p4_guard1, GOTO_AREA_ON_FOOT, 228.5, 240.5, 5.0)
        	SET_CHAR_OBJECTIVE (p4_guard2, GOTO_AREA_ON_FOOT, 228.5, 240.5, 5.0)
        	SET_CHAR_THREAT_REACTION (p4_prison, REACT_AS_NORMAL)
      		SET_CHAR_THREAT_REACTION (p4_guard2, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_REACTION (p4_guard1, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_SEARCH (p4_guard1, AREA_PLAYER_ONLY)
        	SET_CHAR_THREAT_SEARCH (p4_guard2, AREA_PLAYER_ONLY)
		SET_CHAR_OBJECTIVE (p4_guard1, KILL_CHAR_ON_FOOT, p4)
       		SET_CHAR_OBJECTIVE (p4_guard2, KILL_CHAR_ON_FOOT, p4)
        	SET_CHAR_OBJECTIVE (criminal7, KILL_CHAR_ON_FOOT, p4)
        	SET_CHAR_OBJECTIVE (criminal8, KILL_CHAR_ON_FOOT, p4)
  		SET_CHAR_OBJECTIVE (p4_prison, KILL_CHAR_ON_FOOT, p4)
	ENDIF
 
 	IF (CHECK_CHARACTER_HEALTH(p5, 0))
		SET_CHAR_OBJECTIVE (p5_guard1, GOTO_AREA_ON_FOOT, 230.5, 240.5, 5.0)
        	SET_CHAR_OBJECTIVE (p5_guard2, GOTO_AREA_ON_FOOT, 230.5, 240.5, 5.0)
        	SET_CHAR_THREAT_REACTION (p5_prison, REACT_AS_NORMAL)
      		SET_CHAR_THREAT_REACTION (p5_guard2, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_REACTION (p5_guard1, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_SEARCH (p5_guard1, AREA_PLAYER_ONLY)
        	SET_CHAR_THREAT_SEARCH (p5_guard2, AREA_PLAYER_ONLY)
		SET_CHAR_OBJECTIVE (p5_guard1, KILL_CHAR_ON_FOOT, p5)
       		SET_CHAR_OBJECTIVE (p5_guard2, KILL_CHAR_ON_FOOT, p5)
        	SET_CHAR_OBJECTIVE (criminal9, KILL_CHAR_ON_FOOT, p5)
        	SET_CHAR_OBJECTIVE (criminal10, KILL_CHAR_ON_FOOT, p5)
  		SET_CHAR_OBJECTIVE (p5_prison, KILL_CHAR_ON_FOOT, p5)
	ENDIF
 
 	IF (CHECK_CHARACTER_HEALTH(p6, 0))
		SET_CHAR_OBJECTIVE (p6_guard1, GOTO_AREA_ON_FOOT, 232.5, 240.5, 5.0)
        	SET_CHAR_OBJECTIVE (p6_guard2, GOTO_AREA_ON_FOOT, 232.5, 240.5, 5.0)
        	SET_CHAR_THREAT_REACTION (p6_prison, REACT_AS_NORMAL)
      		SET_CHAR_THREAT_REACTION (p6_guard2, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_REACTION (p6_guard1, REACT_AS_NORMAL)
        	SET_CHAR_THREAT_SEARCH (p6_guard1, AREA_PLAYER_ONLY)
        	SET_CHAR_THREAT_SEARCH (p6_guard2, AREA_PLAYER_ONLY)
		SET_CHAR_OBJECTIVE (p6_guard1, KILL_CHAR_ON_FOOT, p6)
       		SET_CHAR_OBJECTIVE (p6_guard2, KILL_CHAR_ON_FOOT, p6)
        	SET_CHAR_OBJECTIVE (criminal11, KILL_CHAR_ON_FOOT, p6)
        	SET_CHAR_OBJECTIVE (criminal12, KILL_CHAR_ON_FOOT, p6)
  		SET_CHAR_OBJECTIVE (p6_prison, KILL_CHAR_ON_FOOT, p6)
	ENDIF
 
ENDIF
	
IF (action = 1)
        alarm1 = CREATE_SOUND (226.0, 232.5, 6.0) PRISON_ALARM PLAY_FOREVER END
        OPEN_DOOR (p1_door)
        OPEN_DOOR (p2_door)
        OPEN_DOOR (p3_door)
        OPEN_DOOR (p4_door)
        OPEN_DOOR (p5_door)
        REMOVE_BLOCK (221,228,5, DO_DROP)
        REMOVE_BLOCK (221,230,5, DO_DROP)
        REMOVE_BLOCK (221,232,5, DO_DROP)
        REMOVE_BLOCK (221,234,5, DO_DROP)
        REMOVE_BLOCK (221,236,5, DO_DROP)
        REMOVE_BLOCK (221,238,5, DO_DROP)
        REMOVE_BLOCK (232,238,5, DO_DROP)
        REMOVE_BLOCK (232,237,5, DO_DROP)
        REMOVE_BLOCK (232,235,5, DO_DROP)
        REMOVE_BLOCK (232,233,5, DO_DROP)
        SET_CHAR_THREAT_REACTION (criminal13, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal14, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal15, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal16, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal17, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal18, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal19, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal20, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal21, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal22, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal23, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal24, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal25, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal26, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal27, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal28, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal29, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal30, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal31, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal32, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal33, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal34, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal35, REACT_AS_NORMAL)
        SET_CHAR_THREAT_REACTION (criminal36, REACT_AS_NORMAL)
        SET_CHAR_THREAT_SEARCH (criminal13, AREA)
        SET_CHAR_THREAT_SEARCH (criminal14, AREA)
        SET_CHAR_THREAT_SEARCH (criminal15, AREA)
        SET_CHAR_THREAT_SEARCH (criminal16, AREA)
        SET_CHAR_THREAT_SEARCH (criminal17, AREA)
        SET_CHAR_THREAT_SEARCH (criminal18, AREA)
        SET_CHAR_THREAT_SEARCH (criminal19, AREA)
        SET_CHAR_THREAT_SEARCH (criminal20, AREA)
        SET_CHAR_THREAT_SEARCH (criminal21, AREA)
        SET_CHAR_THREAT_SEARCH (criminal22, AREA)
        SET_CHAR_THREAT_SEARCH (criminal23, AREA)
        SET_CHAR_THREAT_SEARCH (criminal24, AREA)
        SET_CHAR_THREAT_SEARCH (criminal25, AREA)
        SET_CHAR_THREAT_SEARCH (criminal26, AREA)
        SET_CHAR_THREAT_SEARCH (criminal27, AREA)
        SET_CHAR_THREAT_SEARCH (criminal28, AREA)
        SET_CHAR_THREAT_SEARCH (criminal29, AREA)
        SET_CHAR_THREAT_SEARCH (criminal30, AREA)
        SET_CHAR_THREAT_SEARCH (criminal31, AREA)
        SET_CHAR_THREAT_SEARCH (criminal32, AREA)
        SET_CHAR_THREAT_SEARCH (criminal33, AREA)
        SET_CHAR_THREAT_SEARCH (criminal34, AREA)
        SET_CHAR_THREAT_SEARCH (criminal35, AREA)
        SET_CHAR_THREAT_SEARCH (criminal36, AREA)
        SET_CHAR_OBJECTIVE (criminal13, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal31)
        SET_CHAR_OBJECTIVE (criminal14, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal31)
        SET_CHAR_OBJECTIVE (criminal15, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal31)
        SET_CHAR_OBJECTIVE (criminal16, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal32)
        SET_CHAR_OBJECTIVE (criminal17, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal32)
        SET_CHAR_OBJECTIVE (criminal18, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal32)
        SET_CHAR_OBJECTIVE (criminal19, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal33)
        SET_CHAR_OBJECTIVE (criminal20, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal33)
        SET_CHAR_OBJECTIVE (criminal21, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal33)
        SET_CHAR_OBJECTIVE (criminal22, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal34)
        SET_CHAR_OBJECTIVE (criminal23, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal34)
        SET_CHAR_OBJECTIVE (criminal24, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal34)
        SET_CHAR_OBJECTIVE (criminal25, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal35)
        SET_CHAR_OBJECTIVE (criminal26, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal35)
        SET_CHAR_OBJECTIVE (criminal27, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal35)
        SET_CHAR_OBJECTIVE (criminal28, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal36)
        SET_CHAR_OBJECTIVE (criminal29, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal36)
        SET_CHAR_OBJECTIVE (criminal30, FLEE_CHAR_ON_FOOT_TILL_SAFE, criminal36)
        
        SET_CHAR_OBJECTIVE (criminal31, KILL_CHAR_ON_FOOT, criminal13)
        IF (HAS_CHARACTER_DIED (criminal13))
		SET_CHAR_OBJECTIVE (criminal31, KILL_CHAR_ON_FOOT, criminal14)
        ENDIF
        IF (HAS_CHARACTER_DIED (criminal14))
		SET_CHAR_OBJECTIVE (criminal31, KILL_CHAR_ON_FOOT, criminal15)
        ENDIF
       	IF (CHECK_CHARACTER_HEALTH(p1, 0))
		IF (HAS_CHARACTER_DIED (criminal15))
			SET_CHAR_OBJECTIVE (criminal31, KILL_CHAR_ON_FOOT, p1)
		ENDIF
        ENDIF
        
        SET_CHAR_OBJECTIVE (criminal32, KILL_CHAR_ON_FOOT, criminal16)
        IF (HAS_CHARACTER_DIED (criminal16))
		SET_CHAR_OBJECTIVE (criminal32, KILL_CHAR_ON_FOOT, criminal17)
        ENDIF
        IF (HAS_CHARACTER_DIED (criminal17))
		SET_CHAR_OBJECTIVE (criminal32, KILL_CHAR_ON_FOOT, criminal18)
        ENDIF
       	IF (CHECK_CHARACTER_HEALTH(p2, 0))
		IF (HAS_CHARACTER_DIED (criminal18))
			SET_CHAR_OBJECTIVE (criminal32, KILL_CHAR_ON_FOOT, p2)
		ENDIF
        ENDIF
        
        SET_CHAR_OBJECTIVE (criminal33, KILL_CHAR_ON_FOOT, criminal19)
        IF (HAS_CHARACTER_DIED (criminal19))
		SET_CHAR_OBJECTIVE (criminal33, KILL_CHAR_ON_FOOT, criminal20)
        ENDIF
        IF (HAS_CHARACTER_DIED (criminal20))
		SET_CHAR_OBJECTIVE (criminal33, KILL_CHAR_ON_FOOT, criminal21)
        ENDIF
       	IF (CHECK_CHARACTER_HEALTH(p3, 0))
		IF (HAS_CHARACTER_DIED (criminal21))
			SET_CHAR_OBJECTIVE (criminal33, KILL_CHAR_ON_FOOT, p3)
		ENDIF
        ENDIF
        
        SET_CHAR_OBJECTIVE (criminal34, KILL_CHAR_ON_FOOT, criminal22)
        IF (HAS_CHARACTER_DIED (criminal22))
		SET_CHAR_OBJECTIVE (criminal34, KILL_CHAR_ON_FOOT, criminal23)
        ENDIF
	IF (HAS_CHARACTER_DIED (criminal23))
		SET_CHAR_OBJECTIVE (criminal34, KILL_CHAR_ON_FOOT, criminal24)
        ENDIF
       	IF (CHECK_CHARACTER_HEALTH(p4, 0))
		IF (HAS_CHARACTER_DIED (criminal24))
			SET_CHAR_OBJECTIVE (criminal34, KILL_CHAR_ON_FOOT, p4)
		ENDIF
        ENDIF
        
        SET_CHAR_OBJECTIVE (criminal35, KILL_CHAR_ON_FOOT, criminal25)
	IF (HAS_CHARACTER_DIED (criminal25))
		SET_CHAR_OBJECTIVE (criminal35, KILL_CHAR_ON_FOOT, criminal26)
        ENDIF
	IF (HAS_CHARACTER_DIED (criminal26))
		SET_CHAR_OBJECTIVE (criminal35, KILL_CHAR_ON_FOOT, criminal27)
        ENDIF
       	IF (CHECK_CHARACTER_HEALTH(p5, 0))
		IF (HAS_CHARACTER_DIED (criminal27))
			SET_CHAR_OBJECTIVE (criminal35, KILL_CHAR_ON_FOOT, p5)
		ENDIF
        ENDIF
        
        SET_CHAR_OBJECTIVE (criminal36, KILL_CHAR_ON_FOOT, criminal28)
	IF (HAS_CHARACTER_DIED (criminal28))
		SET_CHAR_OBJECTIVE (criminal36, KILL_CHAR_ON_FOOT, criminal29)
        ENDIF
	IF (HAS_CHARACTER_DIED (criminal29))
		SET_CHAR_OBJECTIVE (criminal36, KILL_CHAR_ON_FOOT, criminal30)
        ENDIF
       	IF (CHECK_CHARACTER_HEALTH(p6, 0))
		IF (HAS_CHARACTER_DIED (criminal30))
			SET_CHAR_OBJECTIVE (criminal36, KILL_CHAR_ON_FOOT, p6)
		ENDIF
        ENDIF
      	DELETE_ITEM (alarm1)
ENDIF


//
//
//

//BOT'S RESPAWN

IF (HAS_CHARACTER_DIED(soldier1))
	DELETE_ITEM (soldier1)
	soldier1 = CREATE_CHAR (128.5, 137.3, 2.0) 0 270 ARMY END
	SET_CHAR_SHOOTING_SKILL (soldier1, CRACK_SHOT)
	SET_CHAR_THREAT_SEARCH (soldier1, LINE_OF_SIGHT_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (soldier1, REACT_AS_NORMAL)
	SET_CHAR_OBJECTIVE (soldier1, GUARD_SPOT)
   	GIVE_WEAPON (soldier1, MACHINE_GUN)
ENDIF

IF (HAS_CHARACTER_DIED(soldier2))
	DELETE_ITEM (soldier2)
	soldier2 = CREATE_CHAR (128.5, 138.3, 2.0) 0 270 ARMY END
   	SET_CHAR_SHOOTING_SKILL (soldier2, CRACK_SHOT)
   	SET_CHAR_THREAT_SEARCH (soldier2, LINE_OF_SIGHT_PLAYER_ONLY)
   	SET_CHAR_THREAT_REACTION (soldier2, REACT_AS_NORMAL)
   	SET_CHAR_OBJECTIVE (soldier2, GUARD_SPOT)
  	GIVE_WEAPON (soldier2, MACHINE_GUN)
ENDIF

IF (HAS_CHARACTER_DIED(soldier3))
	DELETE_ITEM (soldier3)
	soldier3 = CREATE_CHAR (128.5, 139.3, 2.0) 0 270 ARMY END
   	SET_CHAR_SHOOTING_SKILL (soldier3, CRACK_SHOT)
   	SET_CHAR_THREAT_SEARCH (soldier3, LINE_OF_SIGHT_PLAYER_ONLY)
   	SET_CHAR_THREAT_REACTION (soldier3, REACT_AS_NORMAL)
   	SET_CHAR_OBJECTIVE (soldier3, GUARD_SPOT)
   	GIVE_WEAPON (soldier3, MACHINE_GUN)
ENDIF

IF (HAS_CHARACTER_DIED(soldier4))
	DELETE_ITEM (soldier4)
	soldier4 = CREATE_CHAR (130.5, 137.8, 2.0) 0 270 ARMY END
   	SET_CHAR_SHOOTING_SKILL (soldier4, CRACK_SHOT)
   	SET_CHAR_THREAT_SEARCH (soldier4, LINE_OF_SIGHT_PLAYER_ONLY)
   	SET_CHAR_THREAT_REACTION (soldier4, REACT_AS_NORMAL)
   	SET_CHAR_OBJECTIVE (soldier4, GUARD_SPOT)
   	GIVE_WEAPON (soldier4, MACHINE_GUN)
ENDIF

IF (HAS_CHARACTER_DIED(soldier5))
	DELETE_ITEM (soldier5)
	soldier5 = CREATE_CHAR (130.5, 138.8, 2.0) 0 270 ARMY END
   	SET_CHAR_SHOOTING_SKILL (soldier5, CRACK_SHOT)
   	SET_CHAR_THREAT_SEARCH (soldier5, LINE_OF_SIGHT_PLAYER_ONLY)
   	SET_CHAR_THREAT_REACTION (soldier5, REACT_AS_NORMAL)
   	SET_CHAR_OBJECTIVE (soldier5, GUARD_SPOT)
   	GIVE_WEAPON (soldier5, MACHINE_GUN)
ENDIF

IF (HAS_CHARACTER_DIED(soldier6))
	DELETE_ITEM (soldier6)
	soldier6 = CREATE_CHAR (130.5, 139.8, 2.0) 0 270 ARMY END
   	SET_CHAR_SHOOTING_SKILL (soldier6, CRACK_SHOT)
   	SET_CHAR_THREAT_SEARCH (soldier6, LINE_OF_SIGHT_PLAYER_ONLY)
   	SET_CHAR_THREAT_REACTION (soldier6, REACT_AS_NORMAL)
   	SET_CHAR_OBJECTIVE (soldier6, GUARD_SPOT)
   	GIVE_WEAPON (soldier6, MACHINE_GUN)
ENDIF

IF (HAS_CHARACTER_DIED(soldier7))
	DELETE_ITEM (soldier7)
	soldier7 = CREATE_CHAR (128.5, 140.3, 2.0) 0 270 ARMY END
   	SET_CHAR_SHOOTING_SKILL (soldier7, CRACK_SHOT)
   	SET_CHAR_THREAT_SEARCH (soldier7, LINE_OF_SIGHT_PLAYER_ONLY)
   	SET_CHAR_THREAT_REACTION (soldier7, REACT_AS_NORMAL)
   	SET_CHAR_OBJECTIVE (soldier7, GUARD_SPOT)
   	GIVE_WEAPON (soldier7, MACHINE_GUN)
ENDIF

//
//
//


ENDWHILE
LEVELEND
