Advertisement
Guest User

Untitled

a guest
Jun 8th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //create
  2. race = GenCont.race
  3. scrWeapons()
  4. wep = 1
  5. if race=1 then wep=22
  6. if race = 3 then wep = 23
  7. bwep = 31
  8.  
  9. ammo[0] = 999
  10. ammo[1] = 96
  11. ammo[2] = 96
  12. ammo[3] = 96
  13. ammo[4] = 96
  14.  
  15. maxhealth = 6
  16. maxspeed = 4
  17. shieldhealth = 200
  18. level = 1
  19. skillpoints = 0
  20. kills = 0
  21.  
  22. //AREA STUFF
  23. global.area = 1
  24. global.subarea = 1
  25. hard = 1
  26.  
  27. //race stuff
  28. if race = 1
  29. {
  30. spr_idle = sprMutant1Idle
  31. spr_walk = sprMutant1Walk
  32. spr_hurt = sprMutant1Hurt
  33. spr_dead = sprMutant1Dead
  34. }
  35. if race = 2
  36. {
  37. maxhealth = 8
  38. spr_idle = sprMutant2Idle
  39. spr_walk = sprMutant2Walk
  40. spr_hurt = sprMutant2Hurt
  41. spr_dead = sprMutant2Dead
  42. }
  43. if race = 3
  44. {
  45. spr_idle = sprMutant3Idle
  46. spr_walk = sprMutant3Walk
  47. spr_hurt = sprMutant3Hurt
  48. spr_dead = sprMutant3Dead
  49. }
  50. if race = 4
  51. {
  52. spr_idle = sprMutant4Idle
  53. spr_walk = sprMutant4Walk
  54. spr_hurt = sprMutant4Hurt
  55. spr_dead = sprMutant4Dead
  56. }
  57. my_health = maxhealth
  58.  
  59.  
  60. //default shit
  61. clicked = 0
  62. wepangle = 0
  63. wepflip = 1
  64. angle = 0
  65. meleereload=0
  66. rad = 0
  67. can_shoot = 1
  68. right = 1
  69. wepright = 1
  70. back = 1
  71. wave = 0
  72. roll = 0
  73. clipsize=6
  74. rtime=0
  75. clip=6
  76. reloadtime=0
  77. bclip = 6
  78. bonusdamage = 0
  79. ItemRoom = 0
  80. friction = 0.4
  81. image_speed = 0.4
  82. focusmode = 0
  83. global.upDown=1
  84. radcap = level*30
  85. areas = 1
  86. vampire = 0
  87. scaryface = 0
  88. vision = 0
  89. threedangle = 0
  90. wkick = 0
  91. if global.threed = 1
  92. if !instance_exists(ThreeDCont)
  93. instance_create(x,y,ThreeDCont)
  94.  
  95. //step
  96. if !instance_exists(GenCont) and visible = 1
  97. {if roll = 0
  98. {
  99. if global.threed = 1
  100. {
  101. threedangle -= (display_mouse_get_x()-160)/5
  102.  
  103. display_mouse_set(window_get_x()+160,window_get_y()+128)
  104.  
  105. if keyboard_check(ord("W"))
  106. motion_add(threedangle,1)
  107. if keyboard_check(ord("A"))
  108. motion_add(threedangle+90,1)
  109.  
  110. if keyboard_check(ord("S"))
  111. motion_add(threedangle+180,1)
  112. if keyboard_check(ord("D"))
  113. motion_add(threedangle-90,1)
  114. }
  115. else
  116. {
  117. if keyboard_check(ord("W"))
  118. vspeed -= 2
  119. if keyboard_check(ord("A"))
  120. hspeed -= 2
  121. if keyboard_check(ord("S"))
  122. vspeed += 2
  123. if keyboard_check(ord("D"))
  124. hspeed += 2
  125. }
  126. if keyboard_check_pressed(vk_escape)
  127. {
  128.     with instance_create(x,y,PauseCont)
  129.     mytext = "[PAUSED]#PRESS ESCAPE TO GO TO THE MENU#PRESS ENTER TO RESUME#THIS TOOK LIKE 10 LINES OF CODE TO MAKE AND I THOUGHT IT WOULD TAKE A TON, HOW FUNNY IS THAT#YOU CAN ALSO ENTER IN CHEATS FROM HERE, PRETTY NEAT HUH"
  130. }
  131.  
  132. if speed > maxspeed
  133. speed = maxspeed
  134.  
  135. if speed = 0
  136. {if sprite_index != spr_hurt
  137. sprite_index = spr_idle}
  138. else
  139. {if sprite_index != spr_hurt
  140. sprite_index = spr_walk}
  141. if sprite_index = spr_hurt
  142. {if image_index > 2
  143. sprite_index = spr_idle}
  144.  
  145. if mouse_x < x
  146. right = -1
  147. else if mouse_x > x
  148. right = 1
  149.  
  150. if mouse_y < y
  151. back = 1
  152. else if mouse_y > y
  153. back = -1
  154.  
  155. if mouse_check_button_pressed(mb_right)
  156. {
  157. //IT'S ACTIVE SHIT BOU
  158. }
  159. if my_health <= 0
  160. instance_destroy()
  161.  
  162.  
  163. //SHOOTING!! AWW YEAH
  164. if keyboard_check_pressed(ord("R")) and clip < clipsize and ammo[wep_type[wep]] >= wep_clipadd[wep]
  165. {
  166. clip += wep_clipadd[wep]
  167. ammo[wep_type[wep]] -= min(wep_clipadd[wep],wep_clipsize[wep]-clip)
  168. sound_play(sndShotReload)
  169. }
  170. reloadtime -=1
  171. if reloadtime < 0
  172. reloadtime = 0
  173. if mouse_check_button_pressed(mb_left) and clip > 0 and can_shoot = 1
  174. clicked = 1
  175. if mouse_check_button_released(mb_left) and clicked = 1
  176. clicked = 0
  177. if wep_auto[wep] = 1 and reloadtime = 0 and mouse_check_button(mb_left) and can_shoot = 1 and clicked = 1
  178. scrFire(mouse_x,mouse_y)
  179. if wep_auto[wep] = 0 and reloadtime = 0 and clicked = 1 and can_shoot = 1
  180. {
  181. scrFire(mouse_x,mouse_y)
  182. clicked = 0
  183. }
  184. //clips boiiiiiiiiiiiiiiiiiii
  185.  
  186. if clip = 0
  187. can_shoot = 0
  188. if clip > 0
  189. can_shoot = 1
  190. if (clipsize != wep_clip[wep]) clipsize = wep_clip[wep];
  191. if clip > clipsize then clip = clipsize
  192. if clip < 0
  193. clip = 0
  194. //SWAP DA WEPS
  195. if (mouse_check_button_pressed(mb_middle) or mouse_wheel_down() or mouse_wheel_up() or keyboard_check_pressed(vk_space) or keyboard_check_pressed(ord("Q"))) and bwep != 0
  196. {
  197. var twep;
  198. twep = wep
  199.  
  200. wep = bwep
  201. bwep = twep
  202. clicked = 0
  203.  
  204. if wep_type[wep] != 0
  205. wepangle = 0
  206. else if wepangle = 0
  207. wepangle = choose(130,-130)
  208. var tclip;
  209. tclip = clip
  210.  
  211. clip = bclip
  212. bclip = tclip
  213. }
  214.  
  215. }
  216.  
  217. //levelling up
  218. radcap = level*30
  219. if rad > radcap
  220. {
  221. sound_play(sndLevelUp)
  222. rad -= radcap
  223. level += 1
  224. instance_create(x,y,LevelUp)
  225. maxhealth += round(random_range(1,20))
  226. bonusdamage += round(random_range(1,10))
  227. maxspeed += random_range(0.01, 0.05)
  228. if global.story = 0
  229. my_health = maxhealth
  230. }
  231. //debug shit
  232. if keyboard_check(ord("F"))
  233. repeat(30)
  234. instance_create(x,y,Rad)
  235. if keyboard_check_pressed(ord("P"))
  236. instance_create(x,y,Portal)
  237. if keyboard_check_pressed(ord("L"))
  238. global.area += 1
  239. if keyboard_check_pressed(ord("K"))
  240. global.subarea += 1
  241. if keyboard_check_pressed(ord("C"))
  242. instance_create(mouse_x,mouse_y,SuperBandit)
  243. if keyboard_check_pressed(ord("I"))
  244. wep -= 1
  245. if keyboard_check_pressed(ord("O"))
  246. wep += 1
  247. //misc
  248. if roll=1
  249. sprite_index=sprRoll
  250.  
  251. //running
  252. if keyboard_check_pressed(vk_shift)
  253. {
  254. maxspeed = 5
  255. imagespeed=0.5
  256. }
  257. if keyboard_check_released(vk_shift)
  258. {
  259. maxspeed = 4
  260. imagespeed=0.4
  261. }
  262.  
  263. //focus mode
  264. if keyboard_check_pressed(vk_control)
  265. {
  266. maxspeed=3
  267. imagespeed=0.3
  268. focusmode = 1
  269. }
  270. if keyboard_check_released(vk_control)
  271. {
  272. maxspeed=4
  273. imagespeed=0.4
  274. focusmode = 0
  275. }
  276. if instance_exists(CrystalShield)
  277. {
  278. maxspeed = 2
  279. }
  280. else maxspeed = 4
  281. }
  282.  
  283. //wall collision
  284. if roll = 0{move_contact_solid(direction,max(1,min(maxspeed,speed)))
  285. if !place_free(x+hspeed,y){hspeed /= 2
  286. if !place_free(x+hspeed,y) hspeed = 0}
  287. if !place_free(x,y+vspeed){vspeed /= 2
  288. if !place_free(x,y+vspeed)vspeed = 0}}
  289. else move_bounce_solid(true)
  290.  
  291.  
  292. if hspeed > 0 and !place_free(x+hspeed,y)
  293. {do hspeed -= friction until place_free(x+hspeed,y) or hspeed <= 0}
  294. else
  295. if hspeed < 0 and !place_free(x+hspeed,y)
  296. {do hspeed += friction until place_free(x+hspeed,y) or hspeed >= 0}
  297.  
  298. if vspeed > 0 and !place_free(x,y+vspeed)
  299. {do vspeed -= friction until place_free(x,y+vspeed) or vspeed <= 0}
  300. else
  301. if vspeed < 0 and !place_free(x,y+vspeed)
  302. {do vspeed += friction until place_free(x,y+vspeed) or vspeed >= 0}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement