Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //create
- race = GenCont.race
- scrWeapons()
- wep = 1
- if race=1 then wep=22
- if race = 3 then wep = 23
- bwep = 31
- ammo[0] = 999
- ammo[1] = 96
- ammo[2] = 96
- ammo[3] = 96
- ammo[4] = 96
- maxhealth = 6
- maxspeed = 4
- shieldhealth = 200
- level = 1
- skillpoints = 0
- kills = 0
- //AREA STUFF
- global.area = 1
- global.subarea = 1
- hard = 1
- //race stuff
- if race = 1
- {
- spr_idle = sprMutant1Idle
- spr_walk = sprMutant1Walk
- spr_hurt = sprMutant1Hurt
- spr_dead = sprMutant1Dead
- }
- if race = 2
- {
- maxhealth = 8
- spr_idle = sprMutant2Idle
- spr_walk = sprMutant2Walk
- spr_hurt = sprMutant2Hurt
- spr_dead = sprMutant2Dead
- }
- if race = 3
- {
- spr_idle = sprMutant3Idle
- spr_walk = sprMutant3Walk
- spr_hurt = sprMutant3Hurt
- spr_dead = sprMutant3Dead
- }
- if race = 4
- {
- spr_idle = sprMutant4Idle
- spr_walk = sprMutant4Walk
- spr_hurt = sprMutant4Hurt
- spr_dead = sprMutant4Dead
- }
- my_health = maxhealth
- //default shit
- clicked = 0
- wepangle = 0
- wepflip = 1
- angle = 0
- meleereload=0
- rad = 0
- can_shoot = 1
- right = 1
- wepright = 1
- back = 1
- wave = 0
- roll = 0
- clipsize=6
- rtime=0
- clip=6
- reloadtime=0
- bclip = 6
- bonusdamage = 0
- ItemRoom = 0
- friction = 0.4
- image_speed = 0.4
- focusmode = 0
- global.upDown=1
- radcap = level*30
- areas = 1
- vampire = 0
- scaryface = 0
- vision = 0
- threedangle = 0
- wkick = 0
- if global.threed = 1
- if !instance_exists(ThreeDCont)
- instance_create(x,y,ThreeDCont)
- //step
- if !instance_exists(GenCont) and visible = 1
- {if roll = 0
- {
- if global.threed = 1
- {
- threedangle -= (display_mouse_get_x()-160)/5
- display_mouse_set(window_get_x()+160,window_get_y()+128)
- if keyboard_check(ord("W"))
- motion_add(threedangle,1)
- if keyboard_check(ord("A"))
- motion_add(threedangle+90,1)
- if keyboard_check(ord("S"))
- motion_add(threedangle+180,1)
- if keyboard_check(ord("D"))
- motion_add(threedangle-90,1)
- }
- else
- {
- if keyboard_check(ord("W"))
- vspeed -= 2
- if keyboard_check(ord("A"))
- hspeed -= 2
- if keyboard_check(ord("S"))
- vspeed += 2
- if keyboard_check(ord("D"))
- hspeed += 2
- }
- if keyboard_check_pressed(vk_escape)
- {
- with instance_create(x,y,PauseCont)
- 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"
- }
- if speed > maxspeed
- speed = maxspeed
- if speed = 0
- {if sprite_index != spr_hurt
- sprite_index = spr_idle}
- else
- {if sprite_index != spr_hurt
- sprite_index = spr_walk}
- if sprite_index = spr_hurt
- {if image_index > 2
- sprite_index = spr_idle}
- if mouse_x < x
- right = -1
- else if mouse_x > x
- right = 1
- if mouse_y < y
- back = 1
- else if mouse_y > y
- back = -1
- if mouse_check_button_pressed(mb_right)
- {
- //IT'S ACTIVE SHIT BOU
- }
- if my_health <= 0
- instance_destroy()
- //SHOOTING!! AWW YEAH
- if keyboard_check_pressed(ord("R")) and clip < clipsize and ammo[wep_type[wep]] >= wep_clipadd[wep]
- {
- clip += wep_clipadd[wep]
- ammo[wep_type[wep]] -= min(wep_clipadd[wep],wep_clipsize[wep]-clip)
- sound_play(sndShotReload)
- }
- reloadtime -=1
- if reloadtime < 0
- reloadtime = 0
- if mouse_check_button_pressed(mb_left) and clip > 0 and can_shoot = 1
- clicked = 1
- if mouse_check_button_released(mb_left) and clicked = 1
- clicked = 0
- if wep_auto[wep] = 1 and reloadtime = 0 and mouse_check_button(mb_left) and can_shoot = 1 and clicked = 1
- scrFire(mouse_x,mouse_y)
- if wep_auto[wep] = 0 and reloadtime = 0 and clicked = 1 and can_shoot = 1
- {
- scrFire(mouse_x,mouse_y)
- clicked = 0
- }
- //clips boiiiiiiiiiiiiiiiiiii
- if clip = 0
- can_shoot = 0
- if clip > 0
- can_shoot = 1
- if (clipsize != wep_clip[wep]) clipsize = wep_clip[wep];
- if clip > clipsize then clip = clipsize
- if clip < 0
- clip = 0
- //SWAP DA WEPS
- 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
- {
- var twep;
- twep = wep
- wep = bwep
- bwep = twep
- clicked = 0
- if wep_type[wep] != 0
- wepangle = 0
- else if wepangle = 0
- wepangle = choose(130,-130)
- var tclip;
- tclip = clip
- clip = bclip
- bclip = tclip
- }
- }
- //levelling up
- radcap = level*30
- if rad > radcap
- {
- sound_play(sndLevelUp)
- rad -= radcap
- level += 1
- instance_create(x,y,LevelUp)
- maxhealth += round(random_range(1,20))
- bonusdamage += round(random_range(1,10))
- maxspeed += random_range(0.01, 0.05)
- if global.story = 0
- my_health = maxhealth
- }
- //debug shit
- if keyboard_check(ord("F"))
- repeat(30)
- instance_create(x,y,Rad)
- if keyboard_check_pressed(ord("P"))
- instance_create(x,y,Portal)
- if keyboard_check_pressed(ord("L"))
- global.area += 1
- if keyboard_check_pressed(ord("K"))
- global.subarea += 1
- if keyboard_check_pressed(ord("C"))
- instance_create(mouse_x,mouse_y,SuperBandit)
- if keyboard_check_pressed(ord("I"))
- wep -= 1
- if keyboard_check_pressed(ord("O"))
- wep += 1
- //misc
- if roll=1
- sprite_index=sprRoll
- //running
- if keyboard_check_pressed(vk_shift)
- {
- maxspeed = 5
- imagespeed=0.5
- }
- if keyboard_check_released(vk_shift)
- {
- maxspeed = 4
- imagespeed=0.4
- }
- //focus mode
- if keyboard_check_pressed(vk_control)
- {
- maxspeed=3
- imagespeed=0.3
- focusmode = 1
- }
- if keyboard_check_released(vk_control)
- {
- maxspeed=4
- imagespeed=0.4
- focusmode = 0
- }
- if instance_exists(CrystalShield)
- {
- maxspeed = 2
- }
- else maxspeed = 4
- }
- //wall collision
- if roll = 0{move_contact_solid(direction,max(1,min(maxspeed,speed)))
- if !place_free(x+hspeed,y){hspeed /= 2
- if !place_free(x+hspeed,y) hspeed = 0}
- if !place_free(x,y+vspeed){vspeed /= 2
- if !place_free(x,y+vspeed)vspeed = 0}}
- else move_bounce_solid(true)
- if hspeed > 0 and !place_free(x+hspeed,y)
- {do hspeed -= friction until place_free(x+hspeed,y) or hspeed <= 0}
- else
- if hspeed < 0 and !place_free(x+hspeed,y)
- {do hspeed += friction until place_free(x+hspeed,y) or hspeed >= 0}
- if vspeed > 0 and !place_free(x,y+vspeed)
- {do vspeed -= friction until place_free(x,y+vspeed) or vspeed <= 0}
- else
- if vspeed < 0 and !place_free(x,y+vspeed)
- {do vspeed += friction until place_free(x,y+vspeed) or vspeed >= 0}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement