Guest User

Untitled

a guest
Apr 13th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.12 KB | None | 0 0
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %%%%%%%%%%%%%%%%%%% HALO 4 : DISCOVERY VIDEO GAME %%%%%%%%%%%%%%%%%%%%
  3. %%%%%%%%%%%%%%%% PROGRAM CREATED BY : PATRICK %%%%%%%%%%%%%%%%%%
  4. %%%%%%%%%%%%%%%%%%% PROGRAM CREATED ON : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6.  
  7. %Button GUI
  8. import GUI
  9.  
  10. %Declaring Variables
  11. var winID : int
  12. var halo_cover : int
  13. var cio_armor : int
  14. var fotus_armor : int
  15. var rogue_armor : int
  16. var orbital_armor : int
  17. var mark6_armor : int
  18. var halo_splash_pic : int
  19. var cio_armor_display : int
  20. var fotus_armor_display : int
  21. var rogue_armor_display : int
  22. var orbital_armor_display : int
  23. var mark6_armor_display : int
  24. var font1 : int
  25. var font2 : int
  26. var font3 : int
  27. var splash_response : string (1)
  28. var name : string
  29. var intro_pic : int
  30. var intro_pic_draw : int
  31. var welcome_pic : int
  32. var welcome_pic_draw : int
  33. var forward_unto_dawn : int
  34. var forward_unto_dawn_pic : int
  35. var mission1_pic1 : int
  36. var mission1_pic1_pic : int
  37. var cryotube : int
  38. var cryotube_pic : int
  39. var mission1_deathgetch : string (1)
  40.  
  41. %Putting pictures into memory
  42. halo_cover := Pic.FileNew ("Qvtn8.jpg")
  43. cio_armor := Pic.FileNew ("cio armor.jpg")
  44. fotus_armor := Pic.FileNew ("fotus armor.jpg")
  45. rogue_armor := Pic.FileNew ("rogue armor.jpg")
  46. orbital_armor := Pic.FileNew ("orbital armor.jpg")
  47. mark6_armor := Pic.FileNew ("mark 6 armor.jpg")
  48. intro_pic := Pic.FileNew ("halo4_unsc_01_blue.jpg")
  49. welcome_pic := Pic.FileNew ("halo4multiplayer.jpg")
  50. forward_unto_dawn := Pic.FileNew ("halo_4___unsc_forward_unto_dawn_by_goyo_noble_141-d5fjs69.jpg")
  51. cryotube := Pic.FileNew ("halo4crytube.jpg")
  52. mission1_pic1 := Pic.FileNew ("halomission1.jpg")
  53.  
  54. %Create Run Window
  55. winID := Window.Open ("graphics:max;max")
  56.  
  57. %Set Title Bar
  58. View.Set ("Title:Halo 4: Discovery")
  59.  
  60. %Color of Background
  61. colorback (black)
  62. color (white)
  63. cls
  64.  
  65. %Procedure Forwards
  66. forward procedure splash_screen
  67. forward procedure intro_to_game
  68. forward procedure welcome_screen
  69. forward procedure cio_button
  70. forward procedure fotus_button
  71. forward procedure rogue_button
  72. forward procedure orbital_button
  73. forward procedure mark6_button
  74. forward procedure armor_selection
  75. forward procedure mission_selection
  76.  
  77. forward procedure mission1_1
  78. forward procedure mission1_2
  79.  
  80. forward procedure mission1_death
  81.  
  82. forward procedure mission1_button_code
  83. forward procedure mission2_button_code
  84. forward procedure mission3_button_code
  85. forward procedure mission4_button_code
  86.  
  87. forward procedure mission1_answer1_button
  88. forward procedure mission1_answer2_button
  89. forward procedure mission1_answer3_button
  90. forward procedure mission1_answer4_button
  91. forward procedure mission1_bonus
  92.  
  93. forward procedure mission1_3
  94. forward procedure mission2_1
  95. forward procedure mission3_1
  96. forward procedure mission4_1
  97.  
  98. %Procedures in Program
  99. body procedure splash_screen
  100.  
  101. halo_splash_pic := Pic.Scale (halo_cover, maxx, maxy)
  102.  
  103. Pic.Draw (halo_splash_pic, 0, 0, picCopy)
  104.  
  105. font1 := Font.New ("Tele-Marines:20")
  106.  
  107. Font.Draw ("Press Enter to Start", 425, 100, font1, white)
  108.  
  109. getch (splash_response)
  110.  
  111. cls
  112.  
  113. end splash_screen
  114.  
  115. body procedure intro_to_game
  116.  
  117. intro_pic_draw := Pic.Scale (intro_pic, maxx, maxy)
  118.  
  119. Pic.Draw (intro_pic_draw, 0, 0, picCopy)
  120.  
  121. drawfillbox (0, 0, 1500, 140, black)
  122.  
  123. font2 := Font.New ("SimHei:20")
  124.  
  125. Font.Draw ("Welcome to Halo 4. You are a genetically modified supersoldier", 80, 100, font2, white)
  126.  
  127. Font.Draw (" called a SPARTAN working for the UNSC. (United Nations Space Command)", 85, 75, font2, white)
  128.  
  129. delay (3000)
  130.  
  131. Font.Draw ("Please Enter your name here: ", 200, 45, font2, white)
  132.  
  133. loop
  134.  
  135. locate (40, 76)
  136.  
  137. get name : *
  138.  
  139. exit when name not= ""
  140.  
  141. end loop
  142.  
  143. delay (100)
  144.  
  145. cls
  146.  
  147. end intro_to_game
  148.  
  149. body procedure welcome_screen
  150.  
  151. welcome_pic_draw := Pic.Scale (welcome_pic, maxx, maxy)
  152.  
  153. Pic.Draw (welcome_pic_draw, 0, 0, picCopy)
  154.  
  155. Font.Draw ("Welcome to the SPARTAN", 20, 420, font2, black)
  156.  
  157. Font.Draw ("program " + name + ".", 20, 390, font2, black)
  158.  
  159. delay (3000)
  160.  
  161. cls
  162.  
  163. end welcome_screen
  164.  
  165. body procedure armor_selection
  166.  
  167. Font.Draw ("Please select your armor you will be using for your SPARTAN career.", 100, 600, font2, white)
  168.  
  169. Font.Draw ("(Only Click your Selection Once)", 200, 570, font2, white)
  170.  
  171. cio_armor_display := Pic.Scale (cio_armor, 290, 470)
  172.  
  173. Pic.Draw (cio_armor_display, 0, 0, picCopy)
  174.  
  175. fotus_armor_display := Pic.Scale (fotus_armor, 290, 470)
  176.  
  177. Pic.Draw (fotus_armor_display, 260, 0, picCopy)
  178.  
  179. rogue_armor_display := Pic.Scale (rogue_armor, 290, 470)
  180.  
  181. Pic.Draw (rogue_armor_display, 540, 0, picCopy)
  182.  
  183. orbital_armor_display := Pic.Scale (orbital_armor, 290, 470)
  184.  
  185. Pic.Draw (orbital_armor_display, 790, 0, picCopy)
  186.  
  187. mark6_armor_display := Pic.Scale (mark6_armor, 290, 470)
  188.  
  189. Pic.Draw (mark6_armor_display, 1070, 0, picCopy)
  190.  
  191. cio_button
  192. fotus_button
  193. rogue_button
  194. orbital_button
  195. mark6_button
  196.  
  197. end armor_selection
  198.  
  199. body procedure cio_button
  200. var cio_armor_button : int := GUI.CreateButton (100, 490, 0, "C.I.O. Armor", mission_selection)
  201. GUI.SetColor (cio_armor_button, 41)
  202. end cio_button
  203.  
  204. body procedure fotus_button
  205. var fotus_armor_button : int := GUI.CreateButton (360, 490, 0, "Fotus Armor", mission_selection)
  206. GUI.SetColor (fotus_armor_button, 24)
  207. end fotus_button
  208.  
  209. body procedure rogue_button
  210. var rogue_armor_button : int := GUI.CreateButton (635, 490, 0, "Rogue Armor", mission_selection)
  211. GUI.SetColor (rogue_armor_button, 55)
  212. end rogue_button
  213.  
  214. body procedure orbital_button
  215. var orbital_armor_button : int := GUI.CreateButton (880, 490, 0, "Orbital Armor", mission_selection)
  216. GUI.SetColor (orbital_armor_button, 40)
  217. end orbital_button
  218.  
  219. body procedure mark6_button
  220. var mark6_armor_button : int := GUI.CreateButton (1150, 490, 0, "Mark VI Armor", mission_selection)
  221. GUI.SetColor (mark6_armor_button, 48)
  222. end mark6_button
  223.  
  224. RIGHT HERE THIS IS THE PROBLEM --V --^
  225.  
  226. body procedure mission_selection
  227.  
  228. cls
  229.  
  230. GUI.Dispose (cio_armor_button)
  231. GUI.Dispose (fotus_armor_button)
  232. GUI.Dispose (rogue_armor_button)
  233. GUI.Dispose (orbital_armor_button)
  234. GUI.Dispose (mark6_armor_button)
  235.  
  236. mission1_button_code
  237. mission2_button_code
  238. mission3_button_code
  239. mission4_button_code
  240.  
  241. end mission_selection
  242.  
  243. body procedure mission1_button_code
  244. var mission1_button : int := GUI.CreateButton (100, 490, 0, "Click Here for Mission 1", mission1_1)
  245. GUI.SetColor (mission1_button, 41)
  246. end mission1_button_code
  247.  
  248. body procedure mission2_button_code
  249. var mission2_button : int := GUI.CreateButton (360, 490, 0, "Click Here for Mission 2", mission2_1)
  250. GUI.SetColor (mission2_button, 24)
  251. end mission2_button_code
  252.  
  253. body procedure mission3_button_code
  254. var mission3_button : int := GUI.CreateButton (635, 490, 0, "Click Here for Mission 3", mission3_1)
  255. GUI.SetColor (mission3_button, 55)
  256. end mission3_button_code
  257.  
  258. body procedure mission4_button_code
  259. var mission4_button : int := GUI.CreateButton (880, 490, 0, "Click Here for Mission 4", mission4_1)
  260. GUI.SetColor (mission4_button, 40)
  261. end mission4_button_code
  262.  
  263. body procedure mission2_1
  264. put "TEST"
  265. end mission2_1
  266.  
  267. body procedure mission3_1
  268. put "TEST"
  269. end mission3_1
  270.  
  271. body procedure mission4_1
  272. put "TEST"
  273. end mission4_1
  274.  
  275. body procedure mission1_death
  276. put "YOU DIED!"
  277.  
  278. getch (mission1_deathgetch)
  279.  
  280. end mission1_death
  281.  
  282. body procedure mission1_1
  283.  
  284. cls
  285.  
  286. forward_unto_dawn_pic := Pic.Scale (forward_unto_dawn, 1350, 700)
  287.  
  288. Pic.DrawSpecial (forward_unto_dawn_pic, 0, 0, picCopy, picFadeIn, 3000)
  289.  
  290. font3 := Font.New ("SimHei:14")
  291.  
  292. Font.Draw ("System: RE-ACTIVATING " + name + ".", 70, 65, font3, white)
  293.  
  294. delay (2000)
  295.  
  296. cls
  297.  
  298. Pic.DrawSpecial (cryotube, 360, 0, picCopy, picFadeIn, 2000)
  299.  
  300. delay (500)
  301.  
  302. drawfillbox (0, 0, 1500, 140, black)
  303.  
  304. Font.Draw ("*HISSING SOUND*", 600, 65, font3, white)
  305.  
  306. delay (2000)
  307.  
  308. cls
  309.  
  310. mission1_pic1_pic := Pic.Scale (mission1_pic1, maxx, maxy)
  311.  
  312. Pic.Draw (mission1_pic1_pic, 0, 0, picCopy)
  313.  
  314. drawfillbox (0, 0, 1500, 140, black)
  315.  
  316. Font.Draw ("Joanna: Glad you woke up, we have several intruder alerts appearing on multiple decks!", 0, 100, font3, white)
  317.  
  318. delay (1000)
  319.  
  320. Font.Draw (name + ": Let's get to work then.", 0, 80, font3, white)
  321.  
  322. delay (7000)
  323.  
  324. cls
  325.  
  326. drawfillbox (0, 0, 1500, 140, black)
  327.  
  328. Font.Draw ("You walk for a few minutes until you come across an intersection with two paths. Which path will you take?", 0, 60, font3, yellow)
  329.  
  330. mission1_answer1_button
  331.  
  332. mission1_answer2_button
  333.  
  334. end mission1_1
  335.  
  336. body procedure mission1_answer1_button
  337.  
  338. var mission1_answer1_button : int := GUI.CreateButton (880, 490, 0, "Click Here to go Right.", mission1_death)
  339. GUI.SetColor (mission1_answer1_button, 40)
  340.  
  341. end mission1_answer1_button
  342.  
  343. body procedure mission1_answer2_button
  344.  
  345. var mission1_answer2_button : int := GUI.CreateButton (880, 450, 0, "Click Here to go Left.", mission1_2)
  346. GUI.SetColor (mission1_answer2_button, 40)
  347.  
  348. end mission1_answer2_button
  349.  
  350. body procedure mission1_2
  351.  
  352. cls
  353.  
  354. Font.Draw ("You decide to take a right. Good choice, because the ceiling of the section of the ship led left collapsed.", 0, 60, font3, yellow)
  355. Font.Draw ("Walking forward for a minute you realize how badly the ship has deteriorated.", 0, 60, font3, yellow)
  356. Font.Draw ("There's a terminal up ahead. You go to it and Joanna appears on the screen.", 0, 60, font3, yellow)
  357. Font.Draw ("Joanna: It seems we've been floating in space for 7 years, 3 months and 13 days.", 0, 60, font3, white)
  358. Font.Draw (name + ": Someone should have found us by now...", 0, 60, font3, white)
  359. Font.Draw ("Joanna: Let's go to the bridge, maybe we can find out where we are.", 0, 60, font3, white)
  360. Font.Draw ("Joanna disappears off the screen and you continue to move along through the ship.", 0, 60, font3, yellow)
  361. Font.Draw ("There's an elevator shaft to your left and another room to your right.", 0, 60, font3, yellow)
  362. Font.Draw ("Which way will you go?", 0, 60, font3, yellow)
  363.  
  364. mission1_answer3_button
  365.  
  366. mission1_answer4_button
  367.  
  368.  
  369. end mission1_2
  370.  
  371. body procedure mission1_answer3_button
  372.  
  373. var mission1_answer3_button : int := GUI.CreateButton (880, 490, 0, "Click Here to go up the elevator.", mission1_3)
  374. GUI.SetColor (mission1_answer3_button, 40)
  375.  
  376. end mission1_answer3_button
  377.  
  378. body procedure mission1_answer4_button
  379.  
  380. var mission1_bonusanswer_button : int := GUI.CreateButton (880, 450, 0, "Click Here to go into the room to your right.", mission1_bonus)
  381. GUI.SetColor (mission1_bonusanswer_button, 40)
  382.  
  383. end mission1_answer4_button
  384.  
  385. body procedure mission1_bonus
  386. put "WOOO, YOU FOUND A SECRET!"
  387. end mission1_bonus
  388.  
  389. body procedure mission1_3
  390. put "MISSION1_3"
  391. end mission1_3
  392.  
  393.  
  394. %DEPLOYING OF PROCEDURES
  395. splash_screen
  396. intro_to_game
  397. welcome_screen
  398. armor_selection
  399.  
  400. loop
  401. exit when GUI.ProcessEvent
  402. end loop
Advertisement
Add Comment
Please, Sign In to add comment