./dlc1_mm_06.lua

  1.  
  2. --[[ 
  3. 	dlc1_mm_06.lua 
  4. 	SR3 Mission Script 
  5. 	DATE: 10-20-2011 
  6. 	AUTHOR:	Randy Oberlerchner 
  7. ]]-- 
  8.  
  9.  
  10. -- Debug flags -- 
  11.  
  12. -- Tweakable Parameters -- 
  13.  
  14. -- Groups -- 
  15. 	dlc1_mm_06_group = { 
  16.  
  17. 	} 
  18.  
  19. -- Navpoints -- 
  20.  
  21. -- Triggers -- 
  22. 	dlc1_mm_06_trigger = { 
  23. 	} 
  24. 				 
  25. -- Characters -- 
  26.  
  27. -- Vehicles -- 
  28.  
  29. -- Mesh Movers -- 
  30.  
  31. -- Text -- 
  32.  
  33. -- Threads -- 
  34.  
  35. -- Checkpoints -- 
  36. 	dlc1_mm_06_checkpoint = { 
  37. 		start = { 
  38. 			name = MISSION_START_CHECKPOINT, 
  39. 		} 
  40. 	} 
  41. 	 
  42. -- Cutscenes -- 
  43. 	CUTSCENE_MISSION_INTRO = "dlc1_gb_out" 
  44. 	CUTSCENE_MISSION_OUTRO = "" 
  45.  
  46. -- Conversations -- 
  47. 	dlc1_mm_06_convo = { 
  48. 		--[[mission_start = { 
  49. 			name = "dlc1_mm_06_convo_1", 
  50. 			handle = INVALID_CONVERSATION_HANDLE 
  51. 		} 
  52. 		]]-- 
  53. 	} 
  54. 		 
  55. -- Other -- 
  56.  
  57.  
  58. -- ************************* 
  59. -- 
  60. -- Standard functions 
  61. -- 
  62. -- ************************* 
  63.  
  64. -- This is the primary entry point for the mission, and is responsible for starting up the mission 
  65. -- at the specified checkpoint. 
  66. -- CALLED FROM CODE 
  67. -- 
  68. -- checkpoint:	The checkpoint the mission should begin at 
  69. -- is_restart:					TRUE if the mission is restarting, FALSE otherwise 
  70. -- 
  71. function dlc1_mm_06_start(checkpoint, is_restart) 
  72. 	-- Check if this mission starting from the beginning 
  73. 	if (checkpoint == dlc1_mm_06_checkpoint.start.name) then 
  74. 		if (is_restart == false) then 
  75. 			-- First time playing mission 
  76. 			 
  77. 			-- Play an intro cutscene??? 
  78. 			if (CUTSCENE_MISSION_INTRO ~= "") then 
  79. 				cutscene_play(CUTSCENE_MISSION_INTRO, nil, nil, false) 
  80. 			end 
  81. 		end 
  82.  
  83. 		fade_out(0)		 
  84. 		fade_out_block() 
  85.  
  86. 		mission_end_success( "dlc1_mm_06" ) 
  87. 	end 
  88.  
  89.  
  90. 	-- Handle mission initialization for the current checkpoint 
  91. 	--dlc1_mm_06_initialize(checkpoint) 
  92.  
  93. 	-- Run the mission from the current checkpoint 
  94. 	--dlc1_mm_06_run(checkpoint) 
  95. 	 
  96. end 
  97.  
  98. -- This is the primary function responsible for running the entire mission from start to finish. 
  99. -- 
  100. -- first_checkpoint:	The first checkpoint to begin running the mission at 
  101. -- 
  102. function dlc1_mm_06_run(first_checkpoint) 
  103. 	local current_checkpoint = first_checkpoint 
  104.  
  105. 	-- Run the mission from the beginning 
  106. 	if( current_checkpoint == dlc1_mm_06_checkpoint.start.name  ) then 
  107. 		--[[ INSERT PROCESSING FOR THE FIRST CHECKPOINT HERE ]]-- 
  108.  
  109. 	end 
  110. end 
  111.  
  112. -- This is the primary function responsible for cleaning up the entire mission 
  113. -- CALLED FROM CODE (+++MUST RETURN IMMEDIATLY+++) 
  114. -- 
  115. function dlc1_mm_06_cleanup() 
  116. 	--[[ INSERT ANY MISSION SPECIFIC CLEAN-UP ]]-- 
  117. end 
  118.  
  119. -- Called when the mission has ended with success 
  120. -- CALLED FROM CODE (+++MUST RETURN IMMEDIATLY+++) 
  121. -- 
  122. function dlc1_mm_06_success() 
  123. 	--[[ INSERT ANY MISSION SPECIFIC SUCCESS STUFF ]]-- 
  124. 	 
  125. end 
  126.  
  127.  
  128. -- ************************* 
  129. -- 
  130. -- Local functions 
  131. -- 
  132. -- ************************* 
  133.  
  134. -- Initialize the mission for the specified checkpoint 
  135. -- 
  136. -- checkpoint:		Checkpoint to initialize the mission to 
  137. -- 
  138. function dlc1_mm_06_initialize(checkpoint) 
  139. 	-- Make sure the screen is completly faded out 
  140. 	mission_start_fade_out(0.0) 
  141.  
  142. 	-- Set the mission author 
  143. 	set_mission_author("Randy Oberlerchner") 
  144.  
  145. 	-- Common initialization 
  146. 	dlc1_mm_06_initialize_common() 
  147.  
  148. 	-- Checkpoint specific initialization 
  149. 	dlc1_mm_06_initialize_checkpoint(checkpoint) 
  150.  
  151. 	-- Start fading in  
  152. 	mission_start_fade_in() 
  153.  
  154. end 
  155.  
  156.  
  157. -- *************************************************** 
  158. -- dlc1_mm_06_run Helper Functions 
  159. -- *************************************************** 
  160.  
  161.  
  162. -- *************************************************** 
  163. -- dlc1_mm_06_initialize Helper Functions 
  164. -- *************************************************** 
  165.  
  166. -- Handle any common initialization 
  167. -- 
  168. function dlc1_mm_06_initialize_common() 
  169. 	--[[ INSERT ANY COMMON INITIALIZATION CODE HERE ]]-- 
  170. 	 
  171. end 
  172.  
  173. -- Checkpoint specific initialization 
  174. -- 
  175. -- checkpoint:		The checkpoint to be initialized 
  176. function dlc1_mm_06_initialize_checkpoint(checkpoint) 
  177.  
  178. 	if (checkpoint == dlc1_mm_06_checkpoint.start.name) then 
  179. 		--[[ INSERT ANY INITIALIZATION CODE FOR STARTING THE MISSION AT THE BEGINNING ]]-- 
  180.  
  181. 	end 
  182.  
  183. end 
  184.  
  185.  
  186. -- *************************************************** 
  187. -- Miscellaneous dlc1_mm_06 Helper Funcrtions 
  188. -- *************************************************** 
  189. function dlc1_mm_06_clear_trigger(trigger) 
  190. 	on_trigger( "", trigger ) 
  191. 	trigger_enable( trigger, false ) 
  192. 	marker_remove_trigger( trigger, SYNC_ALL ) 
  193. end 
  194.  
  195. -- ************************* 
  196. -- 
  197. -- Callback functions 
  198. -- 
  199. -- ************************* 
  200.  
  201.  
  202. -- ************************* 
  203. -- 
  204. -- Thread functions 
  205. -- 
  206. -- ************************* 
  207.  
  208.