GTAMP.com

Grand Theft Auto Multiplayer
It is currently Wed Mar 20, 2019 5:10 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat May 19, 2012 6:23 pm 
Offline
Hitman

Joined: Sat May 19, 2012 6:12 pm
Posts: 108
Location: Holland, AKA The Netherlands
Fixed: Using an counter, making it 30 times the value of the timer, and decrementing it each WHILE_EXEC cycle worked.

Well the title should explain most of it. The script seems to act like the time is always at zero when setting up a timer via DISPLAY_TIMER(Rn2_Timer, 60) or the likes when checking what number Rn2_Timer is at. And that makes it rather problematic, especially in this script/mission where it is used multiple times. I've looked at the Industrial Scripts but cant quite make anything out of the logic they're using for it, either.

So yeah, if anyone can help with a WHILE_EXEC compatible timer to call upon at zero and mid-counting...
I'll just put the whole mission script below to clear up any possible confusion:

Edit: And where's a link to the GMP file compressor program i beliefe Delfi made at some point anyway? I've looked everywhere on GTAMP and Project Cerbera for functional links.

(Warning: very long! I've tried Spoiler tags but they dont hide it in a box, so this is the best i can think of. If anyone has an better idea i'll gladly try that instead, though im not very familiar with some of the custom tags here.)
Code:
//DRUNKEN INVASION

//Mission declares. And most of all, COUNTERS.
OBJ_DATA Rn2_Generator1
OBJ_DATA Rn2_Generator2
OBJ_DATA Rn2_Bomb1
OBJ_DATA Rn2_Bomb2
CHAR_DATA Rn2_RBomber//Lots of people for this one.
CHAR_DATA Rn2_LBomber
CHAR_DATA Rn2_RInvader1
CHAR_DATA Rn2_RInvader2
CHAR_DATA Rn2_RInvader3
CHAR_DATA Rn2_RInvader4
CHAR_DATA Rn2_RInvader5
CHAR_DATA Rn2_RInvader6
CHAR_DATA Rn2_RInvader7
CHAR_DATA Rn2_RInvader8
CHAR_DATA Rn2_RInvader9
CHAR_DATA Rn2_RInvader10
CHAR_DATA Rn2_RInvader11
CHAR_DATA Rn2_RInvader12
CHAR_DATA Rn2_RInvader13
CHAR_DATA Rn2_RInvader14
CHAR_DATA Rn2_RInvader15
CHAR_DATA Rn2_RInvader16
CHAR_DATA Rn2_RInvader17
CHAR_DATA Rn2_RInvader18
CHAR_DATA Rn2_RInvader19
CHAR_DATA Rn2_RInvader20
CHAR_DATA Rn2_RInvader21
CHAR_DATA Rn2_RInvader22
CHAR_DATA Rn2_LInvader1
CHAR_DATA Rn2_LInvader2
CHAR_DATA Rn2_LInvader3
CHAR_DATA Rn2_LInvader4
CHAR_DATA Rn2_LInvader5
CHAR_DATA Rn2_LInvader6
CHAR_DATA Rn2_LInvader7
CHAR_DATA Rn2_LInvader8
CHAR_DATA Rn2_LInvader9
CHAR_DATA Rn2_LInvader10
CHAR_DATA Rn2_LInvader11
CHAR_DATA Rn2_LInvader12
CHAR_DATA Rn2_LInvader13
CHAR_DATA Rn2_LInvader14
CHAR_DATA Rn2_LInvader15
CHAR_DATA Rn2_LInvader16
CHAR_DATA Rn2_LInvader17
CHAR_DATA Rn2_LInvader18
CHAR_DATA Rn2_LInvader19
CHAR_DATA Rn2_LInvader20
CHAR_DATA Rn2_LInvader21
CHAR_DATA Rn2_LInvader22
CHAR_DATA Rn2_LInvader23
CHAR_DATA Rn2_LInvader24
CHAR_DATA Rn2_LInvader25
CHAR_DATA Rn2_LInvader26
CHAR_DATA Rn2_LInvader27
CHAR_DATA Rn2_LInvader28
CHAR_DATA Rn2_LInvader29
CHAR_DATA Rn2_LInvader30
CHAR_DATA Rn2_LInvader31
CHAR_DATA Rn2_LInvader32
CHAR_DATA Rn2_LInvader33
CHAR_DATA Rn2_LInvader34
TIMER_DATA Rn2_Timer
ARROW_DATA Rn2_Arrow
COUNTER Rn2_Passed = 0
COUNTER Rn2_Failed = 0
COUNTER Rn2_Progress = 0
COUNTER Rn2_InvasionProgress = 0
COUNTER Rn2_Failsafe = 50
//COUNTER Rn2_InvadersLeft = 14
//ONSCREEN_COUNTER Rn2_OnscreenInvadersLeft

FORWARD Rn2_Cleanup:

Rn2_Main:

EXEC
//Setup criticals beforehand.
SET Global_OnMission = 1
SET MissionLoop = 1
STOP_PHONE (Global_RedneckPhone2)//Needed for Blue Phones ONLY.

//Mission stuff between this and WHILE_EXEC.
DISPLAY_TIMER (Rn2_Timer, 60)
Rn2_Generator1 = CREATE_OBJ (252.5, 232.5, 2.0) 0 POWERGEN END
Rn2_Bomb1 = CREATE_OBJ (251.5, 232.5, 2.0) 0 BOMB END
Rn2_RBomber = CREATE_CHAR (251.5, 232.5, 2.0) 10 90 CRIMINAL_TYPE1 END
GIVE_WEAPON(Rn2_RBomber, SHOTGUN)
SET_CHAR_THREAT_SEARCH(Rn2_RBomber, LINE_OF_SIGHT_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_RBomber, REACT_AS_NORMAL)
POINT_ARROW_AT(Rn2_Arrow, Rn2_RBomber)
SET_ARROW_COLOUR(Rn2_Arrow, RED)
DISPLAY_MESSAGE (1064)//DRUNKEN INVASION!
DISPLAY_BRIEF_NOW (1065)//r!Get to the #Generator north from the Shed NOW!# You need to #kill that guy# over there before he #sets off his bomb!#
ENDEXEC

WHILE_EXEC(MissionLoop = 1)

DO_NOWT//Just in case.

IF(Rn2_Progress = 0)
IF(HAS_CHARACTER_DIED(Rn2_RBomber))
REMOVE_ARROW(Rn2_arrow)
CLEAR_TIMER(Rn2_Timer)
DISPLAY_TIMER(Rn2_Timer, 60)
SET Rn2_Progress = 1
CLEAR_ALL_BRIEFS()
DISPLAY_BRIEF_NOW(1066)//r!That was a close one, but keep guarding it! There's tons of those guys coming at you, defend the generator at all costs!
Rn2_RInvader1 = CREATE_CHAR(218.5, 225.5, 2.0) 10 270 CRIMINAL_TYPE1 END//R-egular, attacks Players.
Rn2_RInvader2 = CREATE_CHAR(218.5, 226.5, 2.0) 10 270 CRIMINAL_TYPE1 END//B-omber - as in, suicide bomber.
Rn2_RInvader3 = CREATE_CHAR(230.5, 247.5, 2.0) 10 270 CRIMINAL_TYPE1 END//D-estroyer, attacks Generators.
GIVE_WEAPON(Rn2_RInvader1, PISTOL)
//GIVE_WEAPON(Rn2_RInvader2, NO_WEAPON)
GIVE_WEAPON(Rn2_RInvader3, ROCKET_LAUNCHER)
SET_CHAR_GRAPHIC_TYPE(Rn2_RInvader3, EMERG_GRAPHIC, 10)//Differs them from R units.
SET_CHAR_THREAT_SEARCH(Rn2_RInvader1, AREA_PLAYER_ONLY)//Keep focusing on Player.
SET_CHAR_THREAT_REACTION(Rn2_RInvader1, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader2, NO_THREATS)//Ignore all.
SET_CHAR_THREAT_REACTION(Rn2_RInvader2, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader3, NO_THREATS)//Only retaliate.
SET_CHAR_THREAT_REACTION(Rn2_RInvader3, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE(Rn2_RInvader1, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_RInvader2, GOTO_AREA_ON_FOOT, 251.5, 232.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_RInvader3, DESTROY_OBJECT, Rn2_Generator1)
ENDIF
ENDIF

IF(Rn2_Progress = 1)
IF((Rn2_Timer = 50) AND (Rn2_Failsafe = 50))
SET Rn2_Failsafe = 40//Prevents repetition.
Rn2_RInvader4 = CREATE_CHAR(230.5, 247.5, 2.0) 10 270 CRIMINAL_TYPE1 END//R
Rn2_RInvader5 = CREATE_CHAR(230.5, 246.5, 2.0) 10 270 CRIMINAL_TYPE1 END//B
Rn2_RInvader6 = CREATE_CHAR(218.5, 226.5, 2.0) 10 270 CRIMINAL_TYPE1 END//D
SET_CHAR_GRAPHIC_TYPE(Rn2_RInvader6, EMERG_GRAPHIC, 10)
GIVE_WEAPON(Rn2_RInvader4, SHOTGUN)
//GIVE_WEAPON(Rn2_RInvader5, NO_WEAPON)
GIVE_WEAPON(Rn2_RInvader6, ROCKET_LAUNCHER)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader4, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_RInvader4, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader5, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader5, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader6, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader6, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE(Rn2_RInvader4, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_RInvader5, GOTO_AREA_ON_FOOT, 251.5, 232.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_RInvader6, DESTROY_OBJECT, Rn2_Generator1)
ENDIF
ENDIF

IF(Rn2_Progress = 1)
IF((Rn2_Timer = 40) AND (Rn2_Failsafe = 40))
SET Rn2_Failsafe = 30
Rn2_RInvader7 = CREATE_CHAR(230.5, 247.5, 2.0) 10 270 CRIMINAL_TYPE1 END//R
Rn2_RInvader8 = CREATE_CHAR(230.5, 246.5, 2.0) 10 270 CRIMINAL_TYPE1 END//R
Rn2_RInvader9 = CREATE_CHAR(218.5, 225.5, 2.0) 10 270 CRIMINAL_TYPE1 END//B
GIVE_WEAPON(Rn2_RInvader7, SHOTGUN)
GIVE_WEAPON(Rn2_RInvader8, DUAL_PISTOL)
//GIVE_WEAPON(Rn2_RInvader9, NO_WEAPON)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader7, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_RInvader7, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader8, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_RInvader8, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader9, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader9, NO_REACTION)
SET_CHAR_OBJECTIVE(Rn2_RInvader7, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_RInvader8, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_RInvader9, GOTO_AREA_ON_FOOT, 251.5, 232.5, 2.0)
ENDIF
ENDIF

IF(Rn2_Progress = 1)
IF((Rn2_Timer = 30) AND (Rn2_Failsafe = 30))
SET Rn2_Failsafe = 20
Rn2_RInvader10 = CREATE_CHAR(230.5, 247.5, 2.0) 10 270 CRIMINAL_TYPE1 END//D
Rn2_RInvader11 = CREATE_CHAR(230.5, 247.5, 2.0) 10 270 CRIMINAL_TYPE1 END//D
Rn2_RInvader12 = CREATE_CHAR(230.5, 247.5, 2.0) 10 270 CRIMINAL_TYPE1 END//R
SET_CHAR_GRAPHIC_TYPE(Rn2_RInvader10, EMERG_GRAPHIC, 10)
SET_CHAR_GRAPHIC_TYPE(Rn2_RInvader11, EMERG_GRAPHIC, 10)
GIVE_WEAPON(Rn2_RInvader10, ROCKET_LAUNCHER)
GIVE_WEAPON(Rn2_RInvader11, ROCKET_LAUNCHER)
GIVE_WEAPON(Rn2_RInvader12, SHOTGUN)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader10, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_RInvader10, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader11, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_RInvader11, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader12, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader12, NO_REACTION)
SET_CHAR_OBJECTIVE(Rn2_RInvader10, DESTROY_OBJECT, Rn2_Generator1)
SET_CHAR_OBJECTIVE(Rn2_RInvader11, DESTROY_OBJECT, Rn2_Generator1)
SET_CHAR_OBJECTIVE(Rn2_RInvader12, KILL_CHAR_ON_FOOT, Player1)
ENDIF
ENDIF

IF(Rn2_Progress = 1)
IF((Rn2_Timer = 20) AND (Rn2_Failsafe = 20))
SET Rn2_Failsafe = 15
Rn2_RInvader13 = CREATE_CHAR(218.5, 225.5, 2.0) 10 270 CRIMINAL_TYPE1 END//B
Rn2_RInvader14 = CREATE_CHAR(218.5, 226.5, 2.0) 10 270 CRIMINAL_TYPE1 END//B
Rn2_RInvader15 = CREATE_CHAR(230.5, 246.5, 2.0) 10 270 CRIMINAL_TYPE1 END//B
Rn2_RInvader16 = CREATE_CHAR(230.5, 247.5, 2.0) 10 270 CRIMINAL_TYPE1 END//R
//GIVE_WEAPON(Rn2_RInvader13, NO_WEAPON)
//GIVE_WEAPON(Rn2_RInvader14, NO_WEAPON)
//GIVE_WEAPON(Rn2_RInvader15, NO_WEAPON)
GIVE_WEAPON(Rn2_RInvader16, SILENCED_MACHINE_GUN)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader13, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader13, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader14, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader14, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader15, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader15, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader16, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_RInvader16, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE(Rn2_RInvader13, GOTO_AREA_ON_FOOT, 251.5, 232.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_RInvader14, GOTO_AREA_ON_FOOT, 251.5, 232.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_RInvader15, GOTO_AREA_ON_FOOT, 251.5, 232.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_RInvader16, KILL_CHAR_ON_FOOT, Player1)
ENDIF
ENDIF

IF(Rn2_Progress = 1)
IF((Rn2_Timer = 15) AND (Rn2_Failsafe = 15))
SET Rn2_Failsafe = 0
Rn2_RInvader17 = CREATE_CHAR(218.5, 225.5, 2.0) 10 270 CRIMINAL_TYPE1 END//D
Rn2_RInvader18 = CREATE_CHAR(218.5, 226.5, 2.0) 10 270 CRIMINAL_TYPE1 END//D
Rn2_RInvader19 = CREATE_CHAR(230.5, 246.5, 2.0) 10 270 CRIMINAL_TYPE1 END//B
SET_CHAR_GRAPHIC_TYPE(Rn2_RInvader17, EMERG_GRAPHIC, 10)
SET_CHAR_GRAPHIC_TYPE(Rn2_RInvader18, EMERG_GRAPHIC, 10)
GIVE_WEAPON(Rn2_RInvader17, ROCKET_LAUNCHER)
GIVE_WEAPON(Rn2_RInvader18, ROCKET_LAUNCHER)
//GIVE_WEAPON(Rn2_RInvader19, NO_WEAPON)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader17, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader17, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader18, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader18, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader19, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader19, NO_REACTION)
SET_CHAR_OBJECTIVE(Rn2_RInvader17, DESTROY_OBJECT, Rn2_Generator1)
SET_CHAR_OBJECTIVE(Rn2_RInvader18, DESTROY_OBJECT, Rn2_Generator1)
SET_CHAR_OBJECTIVE(Rn2_RInvader19, GOTO_AREA_ON_FOOT, 251.5, 232.5, 2.0)
ENDIF
ENDIF

IF(Rn2_Progress = 1)
IF((Rn2_Timer = 0) AND (Rn2_Failsafe = 0))
SET Rn2_Failsafe = 90//For the next invasion!
CLEAR_TIMER(Rn2_Timer)
Rn2_RInvader20 = CREATE_CHAR(218.5, 225.5, 2.0) 10 270 CRIMINAL_TYPE1 END//R
Rn2_RInvader21 = CREATE_CHAR(218.5, 226.5, 2.0) 10 270 CRIMINAL_TYPE1 END//B
Rn2_RInvader22 = CREATE_CHAR(230.5, 246.5, 2.0) 10 270 CRIMINAL_TYPE1 END//B
GIVE_WEAPON(Rn2_RInvader20, SHOTGUN)
GIVE_WEAPON(Rn2_RInvader21, SHOTGUN)
//GIVE_WEAPON(Rn2_RInvader22, NO_WEAPON)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader20, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_RInvader20, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader21, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader21, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_RInvader22, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_RInvader22, NO_REACTION)
SET_CHAR_OBJECTIVE(Rn2_RInvader20, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_RInvader21, GOTO_AREA_ON_FOOT, 251.5, 232.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_RInvader22, GOTO_AREA_ON_FOOT, 251.5, 232.5, 2.0)
ENDIF
ENDIF

IF((Rn2_Progress = 1) AND (Rn2_Failsafe = 90))
IF((HAS_CHARACTER_DIED(Rn2_RInvader1)) AND (HAS_CHARACTER_DIED(Rn2_RInvader2)))
IF((HAS_CHARACTER_DIED(Rn2_RInvader3)) AND (HAS_CHARACTER_DIED(Rn2_RInvader4)))
IF((HAS_CHARACTER_DIED(Rn2_RInvader5)) AND (HAS_CHARACTER_DIED(Rn2_RInvader6)))
IF((HAS_CHARACTER_DIED(Rn2_RInvader7)) AND (HAS_CHARACTER_DIED(Rn2_RInvader8)))
IF((HAS_CHARACTER_DIED(Rn2_RInvader9)) AND (HAS_CHARACTER_DIED(Rn2_RInvader10)))
IF((HAS_CHARACTER_DIED(Rn2_RInvader11)) AND (HAS_CHARACTER_DIED(Rn2_RInvader12)))
IF((HAS_CHARACTER_DIED(Rn2_RInvader13)) AND (HAS_CHARACTER_DIED(Rn2_RInvader14)))
IF((HAS_CHARACTER_DIED(Rn2_RInvader15)) AND (HAS_CHARACTER_DIED(Rn2_RInvader16)))
IF((HAS_CHARACTER_DIED(Rn2_RInvader17)) AND (HAS_CHARACTER_DIED(Rn2_RInvader18)))
IF((HAS_CHARACTER_DIED(Rn2_RInvader19)) AND (HAS_CHARACTER_DIED(Rn2_RInvader20)))
IF((HAS_CHARACTER_DIED(Rn2_RInvader21)) AND (HAS_CHARACTER_DIED(Rn2_RInvader22)))
SET Rn2_Progress = 2
CLEAR_ALL_BRIEFS()
DISPLAY_BRIEF_NOW(1067)//r!Damn it! They're #trying to bring down another Shed# with a bomb! #Get there within 2 Minutes!#
//CLEAR_TIMER(Rn2_Timer)
DISPLAY_TIMER(Rn2_Timer, 120)
Rn2_Generator2 = CREATE_OBJ (76.5, 3.5, 2.0) 0 POWERGEN END
Rn2_Bomb2 = CREATE_OBJ (76.5, 4.5, 2.0) 0 BOMB END
Rn2_LBomber = CREATE_CHAR (76.5, 4.5, 2.0) 11 180 CRIMINAL_TYPE2 END
GIVE_WEAPON(Rn2_LBomber, MACHINE_GUN)
SET_CHAR_THREAT_SEARCH(Rn2_LBomber, LINE_OF_SIGHT_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_LBomber, REACT_AS_NORMAL)
POINT_ARROW_AT(Rn2_Arrow, Rn2_LBomber)
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF

//Did any bomber get close?
IF(Rn2_Progress = 1)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_RInvader2))
IF(NOT(HAS_CHARACTER_DIED(Rn2_RInvader2)))
KILL_CHAR(RN2_RInvader2)
EXPLODE_NO_RING(Rn2_RInvader2)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 1)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_RInvader5))
IF(NOT(HAS_CHARACTER_DIED(Rn2_RInvader5)))
KILL_CHAR(RN2_RInvader5)
EXPLODE_NO_RING(Rn2_RInvader5)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 1)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_RInvader9))
IF(NOT(HAS_CHARACTER_DIED(Rn2_RInvader9)))
KILL_CHAR(RN2_RInvader9)
EXPLODE_NO_RING(Rn2_RInvader9)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 1)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_RInvader13))
IF(NOT(HAS_CHARACTER_DIED(Rn2_RInvader13)))
KILL_CHAR(RN2_RInvader13)
EXPLODE_NO_RING(Rn2_RInvader13)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 1)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_RInvader15))
IF(NOT(HAS_CHARACTER_DIED(Rn2_RInvader15)))
KILL_CHAR(RN2_RInvader15)
EXPLODE_NO_RING(Rn2_RInvader15)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 1)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_RInvader19))
IF(NOT(HAS_CHARACTER_DIED(Rn2_RInvader19)))
KILL_CHAR(RN2_RInvader19)
EXPLODE_NO_RING(Rn2_RInvader19)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 1)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_RInvader21))
IF(NOT(HAS_CHARACTER_DIED(Rn2_RInvader21)))
KILL_CHAR(RN2_RInvader21)
EXPLODE_NO_RING(Rn2_RInvader21)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 1)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_RInvader22))
IF(NOT(HAS_CHARACTER_DIED(Rn2_RInvader22)))
KILL_CHAR(RN2_RInvader22)
EXPLODE_NO_RING(Rn2_RInvader22)
ENDIF
ENDIF
ENDIF

//WAVE TWO -------------------------------------------------

IF(Rn2_Progress = 2)
IF(HAS_CHARACTER_DIED(Rn2_LBomber))
REMOVE_ARROW(Rn2_arrow)
DELETE_ITEM(Rn2_RInvader1)
DELETE_ITEM(Rn2_RInvader2)
DELETE_ITEM(Rn2_RInvader3)
DELETE_ITEM(Rn2_RInvader4)
DELETE_ITEM(Rn2_RInvader5)
DELETE_ITEM(Rn2_RInvader6)
DELETE_ITEM(Rn2_RInvader7)
DELETE_ITEM(Rn2_RInvader8)
DELETE_ITEM(Rn2_RInvader9)
DELETE_ITEM(Rn2_RInvader10)
DELETE_ITEM(Rn2_RInvader11)
DELETE_ITEM(Rn2_RInvader12)
DELETE_ITEM(Rn2_RInvader13)
DELETE_ITEM(Rn2_RInvader14)
DELETE_ITEM(Rn2_RInvader15)
DELETE_ITEM(Rn2_RInvader16)
DELETE_ITEM(Rn2_RInvader17)
DELETE_ITEM(Rn2_RInvader18)
DELETE_ITEM(Rn2_RInvader19)
DELETE_ITEM(Rn2_RInvader20)
DELETE_ITEM(Rn2_RInvader21)
DELETE_ITEM(Rn2_RInvader22)
SET Rn2_Progress = 3
CLEAR_TIMER(Rn2_Timer)
DISPLAY_TIMER(Rn2_Timer, 90)
CLEAR_ALL_BRIEFS()
DISPLAY_BRIEF_NOW(1068)//r!Close one! #They're attacking this one as well,# you know what #you need to do!#
Rn2_LInvader1 = CREATE_CHAR(71.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//R
Rn2_LInvader2 = CREATE_CHAR(72.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
Rn2_LInvader3 = CREATE_CHAR(88.5, 24.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader3, EMERG_GRAPHIC, 11)
GIVE_WEAPON(Rn2_LInvader1, DUAL_PISTOL)
//GIVE_WEAPON(Rn2_LInvader2, NO_WEAPON)
GIVE_WEAPON(Rn2_LInvader3, ROCKET_LAUNCHER)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader1, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_LInvader1, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader2, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader2, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader3, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader3, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE(Rn2_LInvader1, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_LInvader2, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_LInvader3, DESTROY_OBJECT, Rn2_Generator2)
ENDIF
ENDIF

IF(Rn2_Progress = 3)
IF((Rn2_Timer = 80) AND (RN2_Failsafe = 80))
SET Rn2_Failsafe = 70
Rn2_LInvader4 = CREATE_CHAR(72.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
Rn2_LInvader5 = CREATE_CHAR(88.5, 24.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
Rn2_LInvader6 = CREATE_CHAR(88.5, 25.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader4, EMERG_GRAPHIC, 11)
GIVE_WEAPON(Rn2_LInvader4, ROCKET_LAUNCHER)
//GIVE_WEAPON(Rn2_LInvader5, NO_WEAPON)
//GIVE_WEAPON(Rn2_LInvader6, NO_WEAPON)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader4, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader4, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader5, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader5, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader6, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader6, NO_REACTION)
SET_CHAR_OBJECTIVE(Rn2_LInvader4, DESTROY_OBJECT, Rn2_Generator2)
SET_CHAR_OBJECTIVE(Rn2_LInvader5, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_LInvader6, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
ENDIF
ENDIF

IF(Rn2_Progress = 3)
IF((Rn2_Timer = 70) AND (RN2_Failsafe = 70))
SET Rn2_Failsafe = 60
Rn2_LInvader7 = CREATE_CHAR(71.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//R
Rn2_LInvader8 = CREATE_CHAR(72.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//R
Rn2_LInvader9 = CREATE_CHAR(88.5, 25.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader9, EMERG_GRAPHIC, 11)
GIVE_WEAPON(Rn2_LInvader7, DUAL_PISTOL)
GIVE_WEAPON(Rn2_LInvader8, SHOTGUN)
GIVE_WEAPON(Rn2_LInvader9, ROCKET_LAUNCHER)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader7, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_LInvader7, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader8, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_LInvader8, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader9, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader9, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE(Rn2_LInvader7, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_LInvader8, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_LInvader9, DESTROY_OBJECT, Rn2_Generator2)
ENDIF
ENDIF

IF(Rn2_Progress = 3)
IF((Rn2_Timer = 60) AND (RN2_Failsafe = 60))
SET Rn2_Failsafe = 50
Rn2_LInvader10 = CREATE_CHAR(71.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//R
Rn2_LInvader11 = CREATE_CHAR(72.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
Rn2_LInvader12 = CREATE_CHAR(88.5, 25.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
Rn2_LInvader13 = CREATE_CHAR(88.5, 24.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader12, EMERG_GRAPHIC, 11)
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader13, EMERG_GRAPHIC, 11)
GIVE_WEAPON(Rn2_LInvader10, SHOTGUN)
//GIVE_WEAPON(Rn2_LInvader11, NO_WEAPON)
GIVE_WEAPON(Rn2_LInvader12, ROCKET_LAUNCHER)
GIVE_WEAPON(Rn2_LInvader13, ROCKET_LAUNCHER)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader10, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_LInvader10, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader11, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader11, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader12, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader12, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader13, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader13, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE(Rn2_LInvader10, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_LInvader11, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_LInvader12, DESTROY_OBJECT, Rn2_Generator2)
SET_CHAR_OBJECTIVE(Rn2_LInvader13, DESTROY_OBJECT, Rn2_Generator2)
ENDIF
ENDIF

IF(Rn2_Progress = 3)
IF((Rn2_Timer = 50) AND (RN2_Failsafe = 50))
SET Rn2_Failsafe = 40
Rn2_LInvader14 = CREATE_CHAR(71.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
Rn2_LInvader15 = CREATE_CHAR(72.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
Rn2_LInvader16 = CREATE_CHAR(88.5, 25.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
Rn2_LInvader17 = CREATE_CHAR(88.5, 24.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader15, EMERG_GRAPHIC, 11)
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader16, EMERG_GRAPHIC, 11)
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader17, EMERG_GRAPHIC, 11)
//GIVE_WEAPON(Rn2_LInvader14, NO_WEAPON)
GIVE_WEAPON(Rn2_LInvader15, ROCKET_LAUNCHER)
GIVE_WEAPON(Rn2_LInvader16, ROCKET_LAUNCHER)
GIVE_WEAPON(Rn2_LInvader17, ROCKET_LAUNCHER)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader14, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader14, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader15, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader15, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader16, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader16, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader17, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader17, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE(Rn2_LInvader14, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_LInvader15, DESTROY_OBJECT, Rn2_Generator2)
SET_CHAR_OBJECTIVE(Rn2_LInvader16, DESTROY_OBJECT, Rn2_Generator2)
SET_CHAR_OBJECTIVE(Rn2_LInvader17, DESTROY_OBJECT, Rn2_Generator2)
ENDIF
ENDIF

IF(Rn2_Progress = 3)
IF((Rn2_Timer = 40) AND (RN2_Failsafe = 40))
SET Rn2_Failsafe = 30
Rn2_LInvader18 = CREATE_CHAR(71.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//R
Rn2_LInvader19 = CREATE_CHAR(72.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
Rn2_LInvader20 = CREATE_CHAR(88.5, 25.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
Rn2_LInvader21 = CREATE_CHAR(88.5, 24.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
GIVE_WEAPON(Rn2_LInvader18, SILENCED_MACHINE_GUN)
//GIVE_WEAPON(Rn2_LInvader19, NO_WEAPON)
//GIVE_WEAPON(Rn2_LInvader20, NO_WEAPON)
//GIVE_WEAPON(Rn2_LInvader21, NO_WEAPON)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader18, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_LInvader18, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader19, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader19, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader20, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader20, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader21, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader21, NO_REACTION)
SET_CHAR_OBJECTIVE(Rn2_LInvader18, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_LInvader19, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_LInvader20, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_LInvader21, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
ENDIF
ENDIF

IF(Rn2_Progress = 3)
IF((Rn2_Timer = 30) AND (RN2_Failsafe = 30))
SET Rn2_Failsafe = 20
Rn2_LInvader22 = CREATE_CHAR(71.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//R
Rn2_LInvader23 = CREATE_CHAR(72.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//R
Rn2_LInvader24 = CREATE_CHAR(88.5, 24.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
GIVE_WEAPON(Rn2_LInvader22, DUAL_PISTOL)
GIVE_WEAPON(Rn2_LInvader23, SHOTGUN)
//GIVE_WEAPON(Rn2_LInvader24, NO_WEAPON)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader22, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_LInvader22, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader23, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_LInvader23, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader24, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader24, NO_REACTION)
SET_CHAR_OBJECTIVE(Rn2_LInvader22, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_LInvader23, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_LInvader24, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
ENDIF
ENDIF

IF(Rn2_Progress = 3)
IF((Rn2_Timer = 20) AND (RN2_Failsafe = 20))
SET Rn2_Failsafe = 10
Rn2_LInvader25 = CREATE_CHAR(71.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//R
Rn2_LInvader26 = CREATE_CHAR(72.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
Rn2_LInvader27 = CREATE_CHAR(88.5, 24.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader27, EMERG_GRAPHIC, 11)
GIVE_WEAPON(Rn2_LInvader25, PISTOL)
//GIVE_WEAPON(Rn2_LInvader26, NO_WEAPON)
GIVE_WEAPON(Rn2_LInvader27, ROCKET_LAUNCHER)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader25, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_LInvader25, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader26, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader26, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader27, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader27, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE(Rn2_LInvader25, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_LInvader26, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_LInvader27, DESTROY_OBJECT, Rn2_Generator2)
ENDIF
ENDIF

IF(Rn2_Progress = 3)
IF((Rn2_Timer = 10) AND (RN2_Failsafe = 10))
SET Rn2_Failsafe = 0
Rn2_LInvader28 = CREATE_CHAR(88.5, 25.5, 2.0) 11 0 CRIMINAL_TYPE2 END//R
Rn2_LInvader29 = CREATE_CHAR(72.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
Rn2_LInvader30 = CREATE_CHAR(71.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//B
GIVE_WEAPON(Rn2_LInvader28, DUAL_PISTOL)
//GIVE_WEAPON(Rn2_LInvader29, NO_WEAPON)
//GIVE_WEAPON(Rn2_LInvader30, NO_WEAPON)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader28, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION(Rn2_LInvader28, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader29, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader29, NO_REACTION)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader30, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader30, NO_REACTION)
SET_CHAR_OBJECTIVE(Rn2_LInvader28, KILL_CHAR_ON_FOOT, Player1)
SET_CHAR_OBJECTIVE(Rn2_LInvader29, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
SET_CHAR_OBJECTIVE(Rn2_LInvader30, GOTO_AREA_ON_FOOT, 76.5, 4.5, 2.0)
ENDIF
ENDIF

IF(Rn2_Progress = 3)
IF((Rn2_Timer = 0) AND (RN2_Failsafe = 0))
SET Rn2_Failsafe = 100//Start checking for survivors.
CLEAR_TIMER(Rn2_Timer)
Rn2_LInvader31 = CREATE_CHAR(88.5, 25.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
Rn2_LInvader32 = CREATE_CHAR(88.5, 24.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
Rn2_LInvader33 = CREATE_CHAR(71.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
Rn2_LInvader34 = CREATE_CHAR(71.5, 22.5, 2.0) 11 0 CRIMINAL_TYPE2 END//D
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader31, EMERG_GRAPHIC, 11)
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader32, EMERG_GRAPHIC, 11)
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader33, EMERG_GRAPHIC, 11)
SET_CHAR_GRAPHIC_TYPE(Rn2_LInvader34, EMERG_GRAPHIC, 11)
GIVE_WEAPON(Rn2_LInvader31, ROCKET_LAUNCHER)
GIVE_WEAPON(Rn2_LInvader32, ROCKET_LAUNCHER)
GIVE_WEAPON(Rn2_LInvader33, ROCKET_LAUNCHER)
GIVE_WEAPON(Rn2_LInvader34, ROCKET_LAUNCHER)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader31, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader31, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader32, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader32, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader33, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader33, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH(Rn2_LInvader34, NO_THREATS)
SET_CHAR_THREAT_REACTION(Rn2_LInvader34, REACT_AS_NORMAL)
SET_CHAR_OBJECTIVE(Rn2_LInvader31, DESTROY_OBJECT, Rn2_Generator2)
SET_CHAR_OBJECTIVE(Rn2_LInvader32, DESTROY_OBJECT, Rn2_Generator2)
SET_CHAR_OBJECTIVE(Rn2_LInvader33, DESTROY_OBJECT, Rn2_Generator2)
SET_CHAR_OBJECTIVE(Rn2_LInvader34, DESTROY_OBJECT, Rn2_Generator2)
ENDIF
ENDIF

IF((Rn2_Progress = 3) AND (Rn2_Failsafe = 100))
IF((HAS_CHARACTER_DIED(Rn2_LInvader1)) AND (HAS_CHARACTER_DIED(Rn2_LInvader2)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader3)) AND (HAS_CHARACTER_DIED(Rn2_LInvader4)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader5)) AND (HAS_CHARACTER_DIED(Rn2_LInvader6)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader7)) AND (HAS_CHARACTER_DIED(Rn2_LInvader8)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader9)) AND (HAS_CHARACTER_DIED(Rn2_LInvader10)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader11)) AND (HAS_CHARACTER_DIED(Rn2_LInvader12)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader13)) AND (HAS_CHARACTER_DIED(Rn2_LInvader14)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader15)) AND (HAS_CHARACTER_DIED(Rn2_LInvader16)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader17)) AND (HAS_CHARACTER_DIED(Rn2_LInvader18)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader19)) AND (HAS_CHARACTER_DIED(Rn2_LInvader20)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader21)) AND (HAS_CHARACTER_DIED(Rn2_LInvader22)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader23)) AND (HAS_CHARACTER_DIED(Rn2_LInvader24)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader25)) AND (HAS_CHARACTER_DIED(Rn2_LInvader26)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader27)) AND (HAS_CHARACTER_DIED(Rn2_LInvader28)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader29)) AND (HAS_CHARACTER_DIED(Rn2_LInvader30)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader31)) AND (HAS_CHARACTER_DIED(Rn2_LInvader32)))
IF((HAS_CHARACTER_DIED(Rn2_LInvader33)) AND (HAS_CHARACTER_DIED(Rn2_LInvader34)))
CLEAR_ALL_BRIEFS()
DISPLAY_BRIEF_NOW(1069)//r!Damn son that was some crazy defending! You earned some money for that, take this $10.000.
DISPLAY_MESSAGE(1124)//JOB COMPLETE!
SET Rn2_Passed = 1
CLEAR_WANTED_LEVEL(Player1)
ADD_SCORE(Player1, 10000)
RETURN
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF

//Any made it this time?
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader2))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader2)))
KILL_CHAR(RN2_LInvader2)
EXPLODE_NO_RING(Rn2_LInvader2)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader5))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader5)))
KILL_CHAR(RN2_LInvader5)
EXPLODE_NO_RING(Rn2_LInvader5)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader6))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader6)))
KILL_CHAR(RN2_LInvader6)
EXPLODE_NO_RING(Rn2_LInvader6)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader11))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader11)))
KILL_CHAR(RN2_LInvader11)
EXPLODE_NO_RING(Rn2_LInvader11)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader14))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader14)))
KILL_CHAR(RN2_LInvader14)
EXPLODE_NO_RING(Rn2_LInvader14)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader19))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader19)))
KILL_CHAR(RN2_LInvader19)
EXPLODE_NO_RING(Rn2_LInvader19)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader20))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader20)))
KILL_CHAR(RN2_LInvader20)
EXPLODE_NO_RING(Rn2_LInvader20)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader21))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader21)))
KILL_CHAR(RN2_LInvader21)
EXPLODE_NO_RING(Rn2_LInvader21)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader24))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader24)))
KILL_CHAR(RN2_LInvader24)
EXPLODE_NO_RING(Rn2_LInvader24)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader26))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader26)))
KILL_CHAR(RN2_LInvader26)
EXPLODE_NO_RING(Rn2_LInvader26)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader29))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader29)))
KILL_CHAR(RN2_LInvader29)
EXPLODE_NO_RING(Rn2_LInvader29)
ENDIF
ENDIF
ENDIF
IF(Rn2_Progress = 3)
IF(IS_CHAR_OBJECTIVE_PASSED (Rn2_LInvader30))
IF(NOT(HAS_CHARACTER_DIED(Rn2_LInvader30)))
KILL_CHAR(RN2_LInvader30)
EXPLODE_NO_RING(Rn2_LInvader30)
ENDIF
ENDIF
ENDIF

//FAILED STATES ------=========---------==========----------=========----------

//'You're outta time!' Checks.
/*IF((Rn2_Progress = 0) OR (Rn2_Progress = 1))
IF(Rn2_Timer < 1)
EXPLODE_LARGE(Rn2_Bomb1)
EXPLODE_LARGE(Rn2_Generator1)
SET Rn2_Progress = 50//Fail checks.
DELETE_ITEM(Rn2_Bomb1)
ENDIF
ENDIF
IF((Rn2_Progress = 3) OR (Rn2_Progress = 4))
IF(Rn2_Timer < 1)
EXPLODE_LARGE(Rn2_Bomb2)
EXPLODE_LARGE(Rn2_Generator2)
SET Rn2_Progress = 60//Fail checks.
DELETE_ITEM(Rn2_Bomb2)
ENDIF
ENDIF*/

//You blew it (up)! Litterally!
IF(Rn2_Progress = 50)
IF(CHECK_OBJ_MODEL(Rn2_Generator1, POWERGEN_DEAD))
SET Rn2_Failed = 1
CLEAR_ALL_BRIEFS()
DISPLAY_BRIEF_NOW(1070)//r!Damn it! Without that Generator none of that stuff will last!
DISPLAY_MESSAGE(1125)//JOB FAILED!
RETURN
ENDIF
ENDIF
IF((Rn2_Progress = 0) OR (Rn2_Progress = 1))
IF(CHECK_OBJ_MODEL(Rn2_Generator1, POWERGEN_DEAD))
SET Rn2_Failed = 1
CLEAR_ALL_BRIEFS()
DISPLAY_BRIEF_NOW(1070)//r!Damn it! Without that Generator none of that stuff will last!
DISPLAY_MESSAGE(1125)//JOB FAILED!
RETURN
ENDIF
ENDIF
//---------=========---------=========---------
IF(Rn2_Progress = 60)
IF(CHECK_OBJ_MODEL(Rn2_Generator2, POWERGEN_DEAD))
SET Rn2_Failed = 1
CLEAR_ALL_BRIEFS()
DISPLAY_BRIEF_NOW(1070)//r!Damn it! Without that Generator none of that stuff will last!
DISPLAY_MESSAGE(1125)//JOB FAILED!
RETURN
ENDIF
ENDIF
IF((Rn2_Progress = 3) OR (Rn2_Progress = 4))
IF(CHECK_OBJ_MODEL(Rn2_Generator2, POWERGEN_DEAD))
SET Rn2_Failed = 1
CLEAR_ALL_BRIEFS()
DISPLAY_BRIEF_NOW(1070)//r!Damn it! Without that Generator none of that stuff will last!
DISPLAY_MESSAGE(1125)//JOB FAILED!
RETURN
ENDIF
ENDIF

//Wasted checks.
IF(HAS_CHAR_BEEN_ARRESTED(Player1))
DISPLAY_MESSAGE (1125)//JOB FAILED!
SET Rn2_Failed = 1
RETURN
ENDIF

IF(HAS_CHARACTER_DIED(Player1))
DISPLAY_MESSAGE (1125)//JOB FAILED!
SET Rn2_Failed = 1
RETURN
ENDIF

ENDWHILE

RETURN

//-----------------------------------CLEAN UP--------------------------------------

Rn2_Cleanup:

IF(Rn2_Passed = 1)
IF(Mission_Rn2Status = 0)
++Global_MissionsPassed
ENDIF
SET Mission_Rn2Status = 1//Important for repeatable missions.
ENABLE_THREAD_TRIGGER(Rn2SubThread)
SET Global_OnMission = 0
SET MissionLoop = 0
//STOP_PHONE_RINGING (Global_WhateverPhone)// - Pick one.
//SET_PHONE_DEAD (Global_WhateverPhone)
ANSWER_PHONE (Player1, Global_RedneckPhone2, -1)
ENDIF

IF(Rn2_Failed = 1)
ENABLE_THREAD_TRIGGER(Rn2SubThread)
SET Global_OnMission = 0
SET MissionLoop = 0
ANSWER_PHONE (Player1, Global_RedneckPhone2, -1)
ENDIF

REMOVE_ARROW(Rn2_Arrow)
CLEAR_TIMER(Rn2_Timer)
SET Global_OnMission = 0
SET MissionLoop = 0
SET Rn2_Passed = 0
SET Rn2_Failed = 0
SET Rn2_Progress = 0
SET Rn2_InvasionProgress = 0
SET Rn2_Failsafe = 0

MISSION_HAS_FINISHED()

RETURN

MISSIONSTART

GOSUB Rn2_Main:
GOSUB Rn2_Cleanup:

MISSIONEND


Last edited by CarThief on Sun May 20, 2012 2:25 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat May 19, 2012 6:43 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1103
there are problems with timers if you start the game as multiplayer game (even 1p). if some time limit is set (maybe also if not) that timer "eats up" your scripted timer. you can avoid this by waiting some seconds. i did this on awkward cargo:
http://gta2dare.omnitude.net/maplist/li ... p=bc_ac.7z
if that doesnt help you can use onscreen timers instead

btw you can make a collapsable code box with gta2 syntax highlighting by using [ mis ] tags

_________________
yur sa'nok ngeyƤ


Top
 Profile  
 
PostPosted: Sat May 19, 2012 6:51 pm 
Offline
Hitman

Joined: Sat May 19, 2012 6:12 pm
Posts: 108
Location: Holland, AKA The Netherlands
Hm, i know of onscreen counters though i didnt hear much about onscreen timer stuff, i'll have to look around for that.
Its in a mission though, so singleplayer or multiplayer, the multiplayer timer shouldnt be an issue as it wont start the mission immediatly from startup.
Its one of the missions of the singleplayer project i mentioned to you in the chat earlier.

EDIT: Couldnt find anything about that in the scripting documentary though. And from the looks of the script file of that map it seems something worthy of a freaking tutorial or atleast an explanation, while looking at it through the browser, maybe Mispad will make it easier to check up on later, though i should go eat something first, and some pills against the headache...


Top
 Profile  
 
PostPosted: Sat May 19, 2012 7:15 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1103
osc:
http://projectcerbera.com/gta/2/tutoria ... EN_COUNTER

i have made syntax highlighting for notepad++. you can use this or scriptpad as well. both have advantages and disadvantages and can be found in jed pakx:
http://gta2dare.omnitude.net/output/jed_pakx.7z
the gmp optimizer can be found in there as well but you can use the fuctionality of TMs Epic editor too. it's even a little better.

_________________
yur sa'nok ngeyƤ


Top
 Profile  
 
PostPosted: Sun May 20, 2012 2:23 am 
Offline
Hitman

Joined: Sat May 19, 2012 6:12 pm
Posts: 108
Location: Holland, AKA The Netherlands
Well i suppose your explanation in chat was a little more specific, finnaly fixed it by having the timer being purely decorative while an counter with 30 times the value of the timer counts down each cycle. And its now the variable used instead of the timer for IF statements.
Now just to fix the other small issues but atleast that works. The mission sure ended up being fairly challenging so far. :P


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group