function scr_player_cheesepepfling() //gml_Script_scr_player_cheesepepfling
{
hsp = 0
sprite_index = spr_cheesepepintro
if (fling < 30)
fling += 0.2
if (!key_attack)
{
if (fling > 0.5)
{
movespeed = fling
hsp = movespeed * xscale
vsp = -6
state = (28 << 0)
sprite_index = spr_cheesepepjumpstart
image_index = 0
}
else
{
state = (24 << 0)
sprite_index = spr_cheesepepintro
image_index = 0
}
}
}
function scr_playerN_machcancelstart() //gml_Script_scr_playerN_machcancelstart
{
hsp = 0
vsp = 0
movespeed = 0
image_speed = 0.5
if (floor(image_index) == (image_number - 1))
{
state = (306 << 0)
sprite_index = spr_playerN_jetpackboost
instance_create(x, y, obj_jumpdust)
movespeed = 15
}
}
function scr_playerN_machcancel() //gml_Script_scr_playerN_machcancel
{
noisemachcancelbuffer = 10
hsp = movespeed
move = key_right + key_left
if (move != 0)
savedmove = move
if (sprite_index == spr_playerN_divebomb || sprite_index == spr_playerN_divebombland || sprite_index == spr_playerN_divebombfall)
{
if (move != 0)
{
if (abs(movespeed) < 12)
movespeed = Approach(movespeed, (move * 12), 1)
else
movespeed = Approach(movespeed, (move * abs(movespeed)), 1)
}
else
movespeed = Approach(movespeed, 0, 0.25)
var xx = movespeed
if (xx == 0)
xx = xscale
if (grounded && vsp > 0 && place_meeting((x + xx), y, obj_solid))
{
mask_index = spr_crouchmask
if ((!(place_meeting((x + xx), y, obj_solid))) || place_meeting((x + xx), y, obj_destructibles))
{
state = (5 << 0)
sprite_index = spr_machroll
image_index = 0
instance_destroy(instance_place((x + xx), y, obj_destructibles))
if (movespeed != 0)
xscale = sign(movespeed)
movespeed = abs(movespeed)
if (movespeed < 6)
movespeed = 6
}
mask_index = spr_player_mask
}
}
else if (move != 0)
movespeed = Approach(movespeed, (move * 8), 1)
else
movespeed = Approach(movespeed, 0, 0.5)
if scr_noise_machcancel_grab()
return;
if (scr_check_groundpound2() && sprite_index != spr_playerN_divebombfall && (!(place_meeting(x, y, obj_ventilator))) && (!grounded))
{
sprite_index = spr_playerN_divebombfall
state = (306 << 0)
vsp = 20
input_buffer_slap = 0
input_buffer_jump = 0
image_index = 0
return;
}
if (grounded && sprite_index == spr_playerN_divebombfall)
{
image_index = 0
sprite_index = spr_playerN_divebombland
}
if (floor(image_index) == (image_number - 1) && sprite_index == spr_playerN_divebombland)
{
image_index = 0
sprite_index = spr_playerN_divebomb
}
if (grounded && (!scr_check_groundpound2()) && vsp >= 0 && sprite_index != spr_playerN_wallbounce)
{
vsp = -7
if (move != 0)
xscale = move
with (instance_create(x, (y + 20), obj_noiseeffect))
sprite_index = spr_noisewalljumpeffect
sprite_index = spr_playerN_wallbounce
GamepadSetVibration(0, 0.5, 0.5, 0.5)
}
if (grounded && key_attack && vsp >= 0 && sprite_index == spr_playerN_wallbounce)
{
fmod_event_one_shot_3d("event:/sfx/playerN/wallbounceland", x, y)
input_buffer_slap = 0
if (move != 0)
xscale = move
else if (savedmove != 0)
xscale = savedmove
jumpstop = true
state = (121 << 0)
movespeed = 12
sprite_index = spr_playerN_mach3
with (instance_create(x, y, obj_noiseeffect))
{
sprite_index = spr_noisegrounddasheffect
image_xscale = other.xscale
}
flash = true
image_index = 0
with (instance_create(x, y, obj_crazyrunothereffect))
image_xscale = other.xscale
}
noisedoublejump = true
if (input_buffer_slap > 0 && key_up && ((!global.pistol) || (!ispeppino)))
{
input_buffer_slap = 0
state = (80 << 0)
image_index = 0
sprite_index = spr_breakdanceuppercut
fmod_event_instance_play(snd_uppercut)
vsp = -21
movespeed = hsp
particle_set_scale((4 << 0), xscale, 1)
create_particle(x, y, (4 << 0), 0)
repeat (4)
{
with (instance_create((x + (irandom_range(-40, 40))), (y + (irandom_range(-40, 40))), obj_explosioneffect))
{
sprite_index = spr_shineeffect
image_speed = 0.35
}
}
}
if ((!ispeppino) && key_up && input_buffer_jump > 0 && (!scr_check_groundpound2()))
{
freefallstart = 0
railmomentum = false
if place_meeting(x, (y + 1), obj_railparent)
railmomentum = true
scr_player_do_noisecrusher()
}
if (grounded && (!key_attack) && vsp >= 0 && sprite_index == spr_playerN_wallbounce)
{
state = (0 << 0)
movespeed = abs(hsp)
}
if (sprite_index == spr_playerN_divebomb || sprite_index == spr_playerN_divebombland || sprite_index == spr_playerN_divebombfall)
{
if ((!instance_exists(dashcloudid)) && grounded)
{
with (instance_create(x, y, obj_dashcloud))
{
image_xscale = other.move
other.dashcloudid = id
}
}
image_speed = abs(movespeed) / 40 + 0.4
}
else
image_speed = 0.5
if (punch_afterimage > 0)
punch_afterimage--
else
{
punch_afterimage = 5
instance_create((x + (random_range(5, -5))), (y + (random_range(20, -20))), obj_tornadoeffect)
if (grounded && (sprite_index == spr_playerN_divebomb || sprite_index == spr_playerN_divebombland || sprite_index == spr_playerN_divebombfall))
{
repeat (2)
{
with (instance_create((x + (random_range(3, -3))), (y + 45), obj_noisedebris))
sprite_index = spr_noisedrilldebris
}
}
create_noise_afterimage(x, y, sprite_index, image_index, xscale)
}
scr_dotaunt()
}
function scr_noise_machcancel_grab() //gml_Script_scr_noise_machcancel_grab
{
if ispeppino
return;
image_speed = 0.5
move = key_left + key_right
if (input_buffer_slap > 0 && (!key_up))
{
if ((!shotgunAnim) || move != 0)
{
input_buffer_shoot = 0
if (move != 0)
xscale = move
input_buffer_slap = 0
key_slap = false
key_slap2 = false
jumpstop = true
if (vsp > -5)
vsp = -5
state = (104 << 0)
movespeed = 12
sprite_index = spr_playerN_sidewayspin
with (instance_create(x, y, obj_crazyrunothereffect))
image_xscale = other.xscale
image_index = 0
particle_set_scale((5 << 0), xscale, 1)
create_particle(x, y, (5 << 0), 0)
}
else
{
if (savedmove != 0)
xscale = savedmove
scr_shotgunshoot()
}
return true;
}
return false;
}
function scr_player_ratmounthurt() //gml_Script_scr_player_ratmounthurt
{
hsp = (-xscale) * movespeed
landAnim = false
jumpAnim = false
hurted = true
gusdashpadbuffer = 0
if (place_meeting((x + sign(hsp)), y, obj_solid) && (!(place_meeting(x, (y + sign(hsp)), obj_slope))))
movespeed = 0
alarm[5] = 2
alarm[7] = 80
if (grounded && vsp > 0)
{
state = (191 << 0)
movespeed = 0
}
if brick
sprite_index = spr_player_ratmounthurt
else
sprite_index = spr_lonegustavo_hurt
image_speed = 0.35
}
function scr_player_bombdelete() //gml_Script_scr_player_bombdelete
{
image_speed = 0.35
hsp = move * movespeed
sprite_index = spr_bombpeprun
move = key_left + key_right
if (dir != xscale)
{
dir = xscale
movespeed = 2
}
if (move != 0)
{
xscale = move
if (movespeed < 5)
movespeed += 0.5
else if (floor(movespeed) == 5)
movespeed = 5
}
else
movespeed = 0
if (movespeed > 5)
movespeed -= 0.1
if key_slap2
{
state = (0 << 0)
with (instance_create(x, y, obj_bomb))
{
hsp = other.xscale * 10
vsp = -8
}
}
}
function scr_player_shotgundash() //gml_Script_scr_player_shotgundash
{
image_speed = 0.35
hsp = xscale * movespeed
if (floor(image_index) == (image_number - 1) || (!key_attack))
{
state = (66 << 0)
sprite_index = spr_shotgunidle
landAnim = false
movespeed = 6
if (!grounded)
{
state = (57 << 0)
sprite_index = spr_shotgunfall
}
}
}
function scr_player_barrelslide() //gml_Script_scr_player_barrelslide
{
image_speed = abs(movespeed) / 8
if (image_speed < 0.35)
image_speed = 0.35
if (image_speed > 0.85)
image_speed = 0.85
hsp = movespeed
if ispeppino
{
if (abs(movespeed) < 14)
movespeed = Approach(movespeed, (xscale * 14), 0.1)
}
else if (abs(movespeed) < 16)
movespeed = Approach(movespeed, (xscale * 16), 0.15)
if (dashcloudtimer == 0 && abs(hsp) > 8 && grounded)
{
with (instance_create(x, y, obj_dashcloud2))
image_xscale = other.xscale
dashcloudtimer = 15
}
if (dashcloudtimer > 0)
dashcloudtimer--
if (floor(image_index) == (image_number - 1))
{
if (sprite_index == spr_barrelslipnslide)
sprite_index = spr_barrelroll
}
if ((!jumpstop) && (!key_jump2) && vsp < 0)
{
jumpstop = true
vsp /= 20
}
if (input_buffer_jump > 0 && can_jump)
{
scr_fmod_soundeffect(jumpsnd, x, y)
input_buffer_jump = 0
vsp = -8.5
jumpstop = false
create_particle(x, y, (3 << 0), 0)
}
if ((!key_attack) && (!(place_meeting(x, (y + 1), obj_current))) && (!(scr_solid(x, (y - 16)))) && (!(scr_solid(x, (y - 32)))))
{
mask_index = spr_player_mask
if (!(place_meeting(x, y, obj_solid)))
{
if grounded
state = (113 << 0)
else
{
state = (114 << 0)
sprite_index = spr_barrelfall
}
}
}
with (instance_place((x + hsp), y, obj_destructibles))
instance_destroy()
if place_meeting((x + sign(hsp)), y, obj_solid)
{
if scr_slope()
{
with (instance_create(x, y, obj_speedlinesup))
playerid = other.id
if (abs(movespeed) <= 5)
vsp = -5
else if (abs(movespeed) >= 12)
vsp = -12
else
vsp = (-abs(movespeed))
state = (115 << 0)
movespeed = 0
if (!ispeppino)
wallspeed = abs(vsp)
fmod_event_one_shot_3d("event:/sfx/barrel/slope", x, y)
if (sprite_index != spr_barrelroll)
sprite_index = spr_barrelroll
}
else
{
GamepadSetVibration(0, 0.6, 0.6, 0.3)
scr_fmod_soundeffect(barrelbumpsnd, x, y)
xscale *= -1
movespeed = xscale * 8
instance_create((x + xscale * 10), (y + 10), obj_bumpeffect)
if place_meeting(x, (y + 1), obj_current)
{
input_buffer_jump = 0
vsp = -8.5
jumpstop = true
create_particle(x, y, (3 << 0), 0)
}
}
}
image_speed = abs(movespeed) / 10
image_speed = clamp(image_speed, 0.25, 0.85)
}
function scr_player_debugstate() //gml_Script_scr_player_debugstate
{
visible = true
image_blend = c_white
var _spd = 6
if key_attack
_spd = 10
hsp = (key_left + key_right) * _spd
vsp = (-((key_up - key_down))) * _spd
image_speed = 1
sprite_index = spr_idle
if (key_jump || key_slap2)
{
image_speed = 0.35
state = (0 << 0)
}
}
function scr_player_trashroll() //gml_Script_scr_player_trashroll
{
image_speed = 0.35
hsp = xscale * movespeed
if (gravesurfingjumpbuffer > 0)
gravesurfingjumpbuffer--
if (scr_slope() && hsp != 0 && movespeed < 14)
scr_player_addslopemomentum(0.25, 0.25)
movespeed = max(3, movespeed)
if (sprite_index != spr_playercorpsestart && sprite_index != spr_playercorpsesurf)
{
if (sprite_index != spr_player_trashjump && sprite_index != spr_player_trashjump2 && sprite_index != spr_player_trashfall)
sprite_index = spr_player_trashslide
else
{
if (floor(image_index) == (image_number - 1) && sprite_index == spr_player_trashjump2)
sprite_index = spr_player_trashfall
if (vsp > 0 && sprite_index == spr_player_trashjump)
{
sprite_index = spr_player_trashjump2
image_index = 0
}
if (grounded && vsp > 0)
{
sprite_index = spr_player_trashslide
image_speed = 0.35
}
}
}
else
{
image_speed = 0.35
if (sprite_index == spr_playercorpsestart && floor(image_index) == (image_number - 1))
sprite_index = spr_playercorpsesurf
}
if ((!instance_exists(obj_slidecloud)) && grounded)
{
if (!(place_meeting(x, (y + 1), obj_current)))
{
with (instance_create(x, y, obj_slidecloud))
image_xscale = other.xscale
}
}
if (input_buffer_jump > 0 && gravesurfingjumpbuffer <= 15)
{
input_buffer_jump = 0
dir = xscale
state = (104 << 0)
sprite_index = spr_mach2jump
jumpstop = false
vsp = -11
instance_create(x, y, obj_jumpdust)
}
if (((place_meeting((x + xscale), y, obj_solid) || place_meeting((x + xscale), y, obj_ghostwall)) && (!(place_meeting((x + hsp), y, obj_destructibles))) && (!(place_meeting((x + hsp), y, obj_rattumble)))) || place_meeting(x, y, obj_timedgate))
{
image_index = 0
sprite_index = spr_bump
state = (106 << 0)
hsp = (-xscale) * 3
vsp = -3
}
}
function scr_player_boxxedpepspin() //gml_Script_scr_player_boxxedpepspin
{
image_speed = 0.5
hsp = xscale * movespeed
doublejump = true
if place_meeting(x, (y + 1), obj_railparent)
{
var _railinst = instance_place(x, (y + 1), obj_railparent)
railmovespeed = _railinst.movespeed
raildir = _railinst.dir
}
move = key_left + key_right
hsp = movespeed + railmovespeed * raildir
if (abs(movespeed) > 0)
movespeed = Approach(movespeed, 0, 0.1)
instance_destroy(instance_place((x + hsp), y, obj_destructibles))
if (scr_solid((x + hsp), y) && (!(place_meeting((x + hsp), y, obj_ratblock))) && (!(place_meeting((x + hsp), y, obj_destructibles))) && ((!(place_meeting((x + hsp), y, obj_slope))) || scr_solid_slope((x + hsp), y)))
{
fmod_event_one_shot_3d("event:/sfx/boxxed/step", x, y)
instance_create((x + hsp), y, obj_bangeffect)
movespeed = (-((sign(hsp) * 6)))
GamepadSetVibration(0, 0.4, 0.4, 0.65)
}
if ispeppino
{
if (((!key_slap) || abs(movespeed) <= 3) && boxxedspinbuffer == 0)
{
target_vsp = 0
state = (35 << 0)
sprite_index = spr_boxxedpepair
}
}
else if (((!key_slap) || abs(movespeed) <= 3) && boxxedspinbuffer == 0)
{
target_vsp = 0
state = (33 << 0)
sprite_index = spr_boxxedpepidle
}
if ((sprite_index == spr_playerN_boxxeddashstart || sprite_index == spr_playerN_boxxedhit) && floor(image_index) == (image_number - 1))
sprite_index = spr_playerN_boxxeddash
}
function scr_player_shotgunfreefall() //gml_Script_scr_player_shotgunfreefall
{
image_speed = 0.35
move = key_left + key_right
hsp = move * movespeed
if (dir != xscale)
{
dir = xscale
movespeed = 0
}
if (move != 0)
{
if (movespeed < 8)
movespeed += 0.5
}
else
movespeed = 0
if (sprite_index == spr_shotgunjump1)
{
if (floor(image_index) == (image_number - 1))
{
sprite_index = spr_shotgunjump3
image_index = 0
}
}
if (sprite_index == spr_shotgunjump3)
{
if grounded
{
sprite_index = spr_shotgunjump2
image_index = 0
fmod_event_one_shot_3d("event:/sfx/pep/groundpound", x, y)
create_particle(x, y, (12 << 0), 0)
with (obj_camera)
{
shake_mag = 5
shake_mag_acc = 15 / room_speed
}
}
}
if (sprite_index == spr_shotgunjump2)
{
hsp = 0
if (floor(image_index) == (image_number - 1))
{
state = (66 << 0)
sprite_index = spr_shotgunland
image_index = 0
landAnim = true
}
}
}
function scr_player_ratmountcrouch() //gml_Script_scr_player_ratmountcrouch
{
move = key_left + key_right
hsp = movespeed
if (place_meeting((x + hsp), y, obj_solid) && (!(place_meeting((x + hsp), y, obj_slope))) && (!(place_meeting((x + hsp), y, obj_destructibles))))
movespeed = 0
if (move != 0)
{
if (move == xscale)
{
if (abs(movespeed) < 4)
movespeed = Approach(movespeed, (xscale * 4), 0.5)
else
movespeed = Approach(movespeed, (xscale * 4), 0.1)
}
else
{
movespeed = Approach(movespeed, 0, 0.5)
if (abs(movespeed) <= 0)
xscale = move
}
if (abs(movespeed) < 3 && move != 0)
image_speed = 0.35
else if (abs(movespeed) > 3 && abs(movespeed) < 6)
image_speed = 0.45
else
image_speed = 0.6
}
else
movespeed = Approach(movespeed, 0, 0.5)
if (!grounded)
{
state = (192 << 0)
jumpAnim = false
sprite_index = spr_player_ratmountgroundpoundfall
}
if (((grounded && (!key_down)) || brick) && (!(scr_solid(x, (y - 16)))) && (!(scr_solid(x, (y - 32)))))
state = (191 << 0)
if (hsp != 0)
sprite_index = spr_lonegustavo_crouchwalk
else
sprite_index = spr_lonegustavo_crouch
}
function scr_player_blockstance() //gml_Script_scr_player_blockstance
{
hsp = Approach(hsp, 0, 0.5)
movespeed = 0
if (sprite_index == spr_player_airattackstart && floor(image_index) == (image_number - 1))
sprite_index = spr_player_airattack
if ((!key_attack) && sprite_index != spr_player_airattackstart)
{
state = (0 << 0)
landAnim = false
}
}
function scr_player_graffiti() //gml_Script_scr_player_graffiti
{
hsp = 0
vsp = (-grav)
image_speed = 0.5
if (floor(image_index) == (image_number - 1))
{
state = (0 << 0)
if tauntstoredisgustavo
state = (191 << 0)
if (global.graffiticount >= global.graffitimax)
instance_create(x, y, obj_key)
}
}
function scr_playersounds() //gml_Script_scr_playersounds
{
with (obj_player)
{
if instance_exists(obj_pizzaface)
{
if (!fmod_event_instance_is_playing(global.snd_pizzafacemoving))
fmod_event_instance_play(global.snd_pizzafacemoving)
with (obj_pizzaface)
fmod_event_instance_set_3d_attributes(global.snd_pizzafacemoving, x, y)
}
else
fmod_event_instance_stop(global.snd_pizzafacemoving, true)
if (state == (146 << 0) && sprite_index == spr_firemouthend)
{
if (image_index > 8 && (!fmod_event_instance_is_playing(burpsnd)))
{
fmod_event_instance_play(burpsnd)
fmod_event_instance_set_3d_attributes(burpsnd, x, y)
}
}
if (global.snd_alarm_baddieID != noone)
{
if (!instance_exists(global.snd_alarm_baddieID))
{
global.snd_alarm_baddieID = -4
fmod_event_instance_stop(global.snd_alarm, true)
}
else
fmod_event_instance_set_3d_attributes(global.snd_alarm, global.snd_alarm_baddieID.x, global.snd_alarm_baddieID.y)
}
if (state != (150 << 0) && sprite_index != spr_knightpepstart && state != (52 << 0) && state != (61 << 0) && state != (297 << 0) && state != (296 << 0) && state != (112 << 0) && state != (98 << 0) && state != (59 << 0) && state != (89 << 0) && state != (9 << 0))
{
if (!scr_transformationcheck())
{
if (!transformationsnd)
{
transformationsnd = true
if (irandom(100) <= 70)
fmod_event_instance_play(snd_voicetransfo)
fmod_event_one_shot_3d("event:/sfx/misc/transfo", x, y)
}
}
else if transformationsnd
{
transformationsnd = false
if (irandom(100) <= 70)
fmod_event_instance_play(snd_voiceouttransfo)
fmod_event_one_shot_3d("event:/sfx/misc/detransfo", x, y)
}
}
fmod_event_instance_set_3d_attributes(snd_voiceouttransfo, x, y)
fmod_event_instance_set_3d_attributes(snd_voicetransfo, x, y)
fmod_event_instance_set_3d_attributes(snd_voiceok, x, y)
fmod_event_instance_set_3d_attributes(snd_voicehurt, x, y)
fmod_event_instance_set_3d_attributes(snd_uppercut, x, y)
fmod_event_instance_set_3d_attributes(snd_dive, x, y)
fmod_event_instance_set_3d_attributes(snd_crouchslide, x, y)
fmod_event_instance_set_3d_attributes(rollgetupsnd, x, y)
fmod_event_instance_set_3d_attributes(animatronicsnd, x, y)
fmod_event_instance_set_3d_attributes(snd_dashpad, x, y)
fmod_event_instance_set_3d_attributes(gallopingsnd, x, y)
if (state == (108 << 0) || state == (122 << 0) || state == (76 << 0) || (state == (61 << 0) && tauntstoredstate == (76 << 0)))
{
if (!fmod_event_instance_is_playing(freefallsnd))
fmod_event_instance_play(freefallsnd)
fmod_event_instance_set_paused(freefallsnd, false)
fmod_event_instance_set_3d_attributes(freefallsnd, x, y)
}
else
fmod_event_instance_stop(freefallsnd, true)
if ((ispeppino && (state == (104 << 0) || state == (121 << 0) || state == (37 << 0))) || (state == (184 << 0) && sprite_index != spr_rocketstart))
{
fmod_event_instance_set_paused(machsnd, false)
if (!fmod_event_instance_is_playing(machsnd))
fmod_event_instance_play(machsnd)
var s = 0
if (state == (104 << 0) && sprite_index == spr_mach1 && grounded)
s = 1
else if ((state == (104 << 0) && sprite_index == spr_mach) || state == (37 << 0))
s = 2
else if (state == (121 << 0) && sprite_index != spr_crazyrun)
s = 3
else if (sprite_index == spr_crazyrun)
s = 4
if (state == (184 << 0))
s = 4
fmod_event_instance_set_3d_attributes(machsnd, x, y)
fmod_event_instance_set_parameter(machsnd, "state", s, true)
}
else
fmod_event_instance_stop(machsnd, true)
if ((state == (38 << 0) && grounded && vsp > 0) || state == (78 << 0) || (state == (211 << 0) && grounded && vsp > 0 && sprite_index == spr_player_trashslide))
{
if (!fmod_event_instance_is_playing(knightslidesnd))
fmod_event_instance_play(knightslidesnd)
fmod_event_instance_set_3d_attributes(knightslidesnd, x, y)
}
else if fmod_event_instance_is_playing(knightslidesnd)
fmod_event_instance_stop(knightslidesnd, true)
var sjumpsnd = superjumpsnd
if ispeppino
{
if (state == (99 << 0))
{
if (!fmod_event_instance_is_playing(sjumpsnd))
{
fmod_event_instance_set_parameter(sjumpsnd, "state", 0, true)
fmod_event_instance_play(sjumpsnd)
}
}
else if (state == (97 << 0))
fmod_event_instance_set_parameter(sjumpsnd, "state", 1, true)
else if (state != (97 << 0))
{
if (fmod_event_instance_is_playing(sjumpsnd) && fmod_event_instance_get_parameter(sjumpsnd, "state") < 1)
fmod_event_instance_stop(sjumpsnd, true)
else if (!fmod_event_instance_is_playing(sjumpsnd))
fmod_event_instance_set_parameter(sjumpsnd, "state", 0, true)
}
if (sprite_index == spr_player_Sjumpcancelstart || sprite_index == spr_playerN_sidewayspin)
fmod_event_instance_stop(sjumpsnd, true)
if fmod_event_instance_is_playing(sjumpsnd)
fmod_event_instance_set_3d_attributes(sjumpsnd, x, y)
}
else
fmod_event_instance_stop(sjumpsnd, true)
if (sprite_index == spr_tumblestart || sprite_index == spr_tumble)
{
if (!fmod_event_instance_is_playing(tumblesnd))
{
fmod_event_instance_play(tumblesnd)
fmod_event_instance_set_parameter(tumblesnd, "state", 0, true)
if (sprite_index == spr_tumblestart)
tumbleintro = true
}
if (sprite_index == spr_tumble && (!tumbleintro))
fmod_event_instance_set_parameter(tumblesnd, "state", 1, true)
fmod_event_instance_set_3d_attributes(tumblesnd, x, y)
}
else
{
if fmod_event_instance_is_playing(tumblesnd)
{
fmod_event_instance_set_parameter(tumblesnd, "state", 2, true)
fmod_event_instance_set_3d_attributes(tumblesnd, x, y)
}
tumbleintro = false
}
if (sprite_index == spr_machroll || sprite_index == spr_backslide || sprite_index == spr_backslideland)
{
if (!fmod_event_instance_is_playing(machrollsnd))
fmod_event_instance_play(machrollsnd)
fmod_event_instance_set_3d_attributes(machrollsnd, x, y)
}
else
fmod_event_instance_stop(machrollsnd, true)
if fmod_event_instance_is_playing(suplexdashsnd)
{
if (state != (42 << 0))
fmod_event_instance_stop(suplexdashsnd, true)
fmod_event_instance_set_3d_attributes(suplexdashsnd, x, y)
}
if (state == (211 << 0) && sprite_index == spr_playercorpsesurf && grounded && vsp > 0)
{
if (!fmod_event_instance_is_playing(gravecorpsesnd))
fmod_event_instance_play(gravecorpsesnd)
fmod_event_instance_set_3d_attributes(gravecorpsesnd, (x + hsp), (y + vsp))
}
else
fmod_event_instance_stop(gravecorpsesnd, true)
if ((state == (116 << 0) && grounded && vsp > 0) || sprite_index == spr_playerN_barrelclimbwall)
{
if (!fmod_event_instance_is_playing(barrelslidesnd))
fmod_event_instance_play(barrelslidesnd)
fmod_event_instance_set_3d_attributes(barrelslidesnd, (x + hsp), (y + vsp))
}
else
fmod_event_instance_stop(barrelslidesnd, true)
if (state == (94 << 0) && sprite_index == spr_currentplayer)
{
if (!fmod_event_instance_is_playing(waterslidesnd))
fmod_event_instance_play(waterslidesnd)
fmod_event_instance_set_3d_attributes(waterslidesnd, (x + hsp), (y + vsp))
}
else
fmod_event_instance_stop(waterslidesnd, true)
if (state == (214 << 0))
{
if (!fmod_event_instance_is_playing(mrpinchsnd))
fmod_event_instance_play(mrpinchsnd)
fmod_event_instance_set_parameter(mrpinchsnd, "state", 0, true)
fmod_event_instance_set_3d_attributes(mrpinchsnd, (x + hsp), (y + vsp))
}
else if fmod_event_instance_is_playing(mrpinchsnd)
{
fmod_event_instance_set_parameter(mrpinchsnd, "state", 1, true)
fmod_event_instance_set_3d_attributes(mrpinchsnd, (x + hsp), (y + vsp))
}
if (hamkuffID != noone && instance_exists(hamkuffID) && (!launched))
{
if (!fmod_event_instance_is_playing(hamkuffsnd))
fmod_event_instance_play(hamkuffsnd)
if launch
fmod_event_instance_set_parameter(hamkuffsnd, "state", 1, true)
else
fmod_event_instance_set_parameter(hamkuffsnd, "state", 0, true)
fmod_event_instance_set_3d_attributes(hamkuffsnd, (x + hsp), (y + vsp))
}
else
{
if fmod_event_instance_is_playing(hamkuffsnd)
{
fmod_event_instance_set_parameter(hamkuffsnd, "state", 2, true)
fmod_event_instance_set_3d_attributes(hamkuffsnd, (x + hsp), (y + vsp))
}
hamkuffID = -4
}
if ((state == (191 << 0) || state == (192 << 0)) && (sprite_index == spr_player_ratmountattack || sprite_index == spr_player_ratmountmach3 || sprite_index == spr_player_ratmountdashjump || sprite_index == spr_lonegustavo_dash || sprite_index == spr_lonegustavo_mach3 || sprite_index == spr_lonegustavo_dashjump))
{
if (!fmod_event_instance_is_playing(ratmountmachsnd))
fmod_event_instance_play(ratmountmachsnd)
s = 0
if (sprite_index == spr_player_ratmountmach3 || sprite_index == spr_lonegustavo_mach3 || sprite_index == spr_player_ratmountdashjump || sprite_index == spr_lonegustavo_dashjump)
s = 1
fmod_event_instance_set_parameter(ratmountmachsnd, "state", s, true)
if grounded
fmod_event_instance_set_parameter(ratmountmachsnd, "ground", 1, true)
else
fmod_event_instance_set_parameter(ratmountmachsnd, "ground", 0, true)
fmod_event_instance_set_3d_attributes(ratmountmachsnd, (x + hsp), (y + vsp))
}
else
fmod_event_instance_stop(ratmountmachsnd, true)
if (state == (259 << 0))
{
if (!fmod_event_instance_is_playing(ratmountpunchsnd))
fmod_event_instance_play(ratmountpunchsnd)
fmod_event_instance_set_3d_attributes(ratmountpunchsnd, (x + hsp), (y + vsp))
}
else
fmod_event_instance_stop(ratmountpunchsnd, true)
if (state == (198 << 0) && sprite_index == spr_player_ratmountwalljump)
{
if (!fmod_event_instance_is_playing(ratmountgroundpoundsnd))
fmod_event_instance_play(ratmountgroundpoundsnd)
s = 0
if instance_exists(superslameffectid)
s = 1
fmod_event_instance_set_parameter(ratmountgroundpoundsnd, "state", s, true)
fmod_event_instance_set_3d_attributes(ratmountgroundpoundsnd, (x + hsp), (y + vsp))
}
else
fmod_event_instance_stop(ratmountgroundpoundsnd, true)
if (state == (225 << 0) && ispeppino)
{
if (!fmod_event_instance_is_playing(animatronicsnd))
fmod_event_instance_play(animatronicsnd)
fmod_event_instance_set_3d_attributes(animatronicsnd, (x + hsp), (y + vsp))
}
else
fmod_event_instance_stop(animatronicsnd, true)
if instance_exists(obj_brickball)
{
if (!fmod_event_instance_is_playing(ratmountballsnd))
fmod_event_instance_play(ratmountballsnd)
fmod_event_instance_set_3d_attributes(ratmountballsnd, (obj_brickball.x + obj_brickball.hsp), (obj_brickball.y + obj_brickball.vsp))
}
else
fmod_event_instance_stop(ratmountballsnd, true)
if instance_exists(obj_balloongrabbableeffect)
{
if (!fmod_event_instance_is_playing(ratdeflatesnd))
fmod_event_instance_play(ratdeflatesnd)
fmod_event_instance_set_3d_attributes(ratdeflatesnd, obj_balloongrabbableeffect.x, obj_balloongrabbableeffect.y)
}
else
fmod_event_instance_stop(ratdeflatesnd, true)
if (state == (21 << 0) && grounded && vsp > 0)
{
if (!fmod_event_instance_is_playing(cheeseballsnd))
fmod_event_instance_play(cheeseballsnd)
fmod_event_instance_set_3d_attributes(cheeseballsnd, (x + hsp), (y + vsp))
}
else
fmod_event_instance_stop(cheeseballsnd, true)
if (state == (31 << 0) && abs(hsp) > 8 && grounded)
{
if (!fmod_event_instance_is_playing(gallopingsnd))
fmod_event_instance_play(gallopingsnd)
}
else if fmod_event_instance_is_playing(gallopingsnd)
fmod_event_instance_stop(gallopingsnd, true)
if (state == (34 << 0))
{
if (!fmod_event_instance_is_playing(boxxedspinsnd))
fmod_event_instance_play(boxxedspinsnd)
fmod_event_instance_set_3d_attributes(boxxedspinsnd, (x + hsp), (y + vsp))
}
else
fmod_event_instance_stop(boxxedspinsnd, true)
if fmod_event_instance_is_playing(pizzapeppersnd)
{
if (state == (254 << 0))
{
fmod_event_instance_set_parameter(pizzapeppersnd, "state", 0, true)
fmod_event_instance_set_3d_attributes(pizzapeppersnd, (x + hsp), (y + vsp))
}
else
fmod_event_instance_set_parameter(pizzapeppersnd, "state", 1, true)
}
if (state == (16 << 0) && sprite_index != spr_ghostidle && sprite_index != spr_ghostjump && ((!ispeppino) || ghostdash))
{
if (!fmod_event_instance_is_playing(ghostspeedsnd))
fmod_event_instance_play(ghostspeedsnd)
s = 0
if (ghostpepper == 1)
s = 1
else if (ghostpepper == 2)
s = 2
else if (ghostpepper >= 3)
s = 3
fmod_event_instance_set_3d_attributes(ghostspeedsnd, x, y)
fmod_event_instance_set_parameter(ghostspeedsnd, "state", s, true)
}
else if fmod_event_instance_is_playing(ghostspeedsnd)
fmod_event_instance_stop(ghostspeedsnd, false)
if (!ispeppino)
{
if (sprite_index == spr_playerN_minigunshoot || sprite_index == spr_playerN_minigundown)
{
if (!fmod_event_instance_is_playing(snd_minigun))
fmod_event_instance_play(snd_minigun)
fmod_event_instance_set_3d_attributes(snd_minigun, x, y)
fmod_event_instance_set_parameter(snd_minigun, "state", 0, true)
}
else if fmod_event_instance_is_playing(snd_minigun)
fmod_event_instance_set_parameter(snd_minigun, "state", 1, true)
if (state == (16 << 0) || (state == (61 << 0) && tauntstoredstate == (16 << 0)))
{
s = ghostpepper
if (s > 2)
s = 2
fmod_event_instance_set_3d_attributes(snd_ghostdash, x, y)
fmod_event_instance_set_parameter(snd_ghostdash, "state", s, true)
}
else
fmod_event_instance_stop(snd_ghostdash, true)
if (state == (99 << 0))
{
if (!fmod_event_instance_is_playing(snd_noiseSjump))
fmod_event_instance_play(snd_noiseSjump)
}
else
fmod_event_instance_stop(snd_noiseSjump, true)
fmod_event_instance_set_3d_attributes(snd_noiseSjump, x, y)
fmod_event_instance_set_3d_attributes(snd_noiseSjumprelease, x, y)
fmod_event_instance_set_3d_attributes(snd_noisedoublejump, x, y)
fmod_event_instance_set_3d_attributes(snd_noisepunch, x, y)
fmod_event_instance_set_3d_attributes(snd_bossdeathN, x, y)
if (sprite_index == spr_playerN_sidewayspin)
fmod_event_instance_stop(snd_noiseSjumprelease, true)
if (state == (104 << 0) || state == (121 << 0) || state == (37 << 0))
{
if (!fmod_event_instance_is_playing(snd_noisemach))
fmod_event_instance_play(snd_noisemach)
s = 0
if (state == (104 << 0) || state == (37 << 0))
s = 1
else if (state == (121 << 0) && sprite_index != spr_crazyrun)
s = 2
else if (sprite_index == spr_crazyrun)
s = 3
fmod_event_instance_set_3d_attributes(snd_noisemach, x, y)
fmod_event_instance_set_parameter(snd_noisemach, "state", s, true)
if (grounded || state == (37 << 0))
fmod_event_instance_set_parameter(snd_noisemach, "ground", 1, true)
else
fmod_event_instance_set_parameter(snd_noisemach, "ground", 0, true)
}
else
fmod_event_instance_stop(snd_noisemach, true)
if (state == (306 << 0) || (state == (61 << 0) && tauntstoredstate == (306 << 0)))
{
if (sprite_index != spr_playerN_divebomb && sprite_index != spr_playerN_divebombfall && sprite_index != spr_playerN_divebombland)
{
if fmod_event_instance_is_playing(snd_divebomb)
fmod_event_instance_stop(snd_divebomb, true)
if ((!fmod_event_instance_is_playing(snd_wallbounce)) && (!fmod_event_instance_get_paused(snd_wallbounce)))
fmod_event_instance_play(snd_wallbounce)
if fmod_event_instance_get_paused(snd_wallbounce)
fmod_event_instance_set_paused(snd_wallbounce, false)
fmod_event_instance_set_3d_attributes(snd_wallbounce, x, y)
}
else
{
if fmod_event_instance_is_playing(snd_wallbounce)
fmod_event_instance_stop(snd_wallbounce, true)
if (!fmod_event_instance_is_playing(snd_divebomb))
fmod_event_instance_play(snd_divebomb)
fmod_event_instance_set_3d_attributes(snd_divebomb, x, y)
if (!grounded)
fmod_event_instance_set_parameter(snd_divebomb, "state", 0, true)
else
fmod_event_instance_set_parameter(snd_divebomb, "state", 1, true)
}
}
else
{
if (state == (84 << 0) && tauntstoredstate == (306 << 0))
fmod_event_instance_set_paused(snd_wallbounce, true)
else if fmod_event_instance_is_playing(snd_wallbounce)
fmod_event_instance_stop(snd_wallbounce, true)
if fmod_event_instance_is_playing(snd_divebomb)
fmod_event_instance_stop(snd_divebomb, true)
}
if (state == (10 << 0) && sprite_index == spr_playerN_firemouthspin)
{
if (!fmod_event_instance_is_playing(snd_noisefiremouth))
fmod_event_instance_play(snd_noisefiremouth)
fmod_event_instance_set_3d_attributes(snd_noisefiremouth, x, y)
}
else if fmod_event_instance_is_playing(snd_noisefiremouth)
fmod_event_instance_stop(snd_noisefiremouth, false)
if (sprite_index == spr_playerN_rushdown)
{
if (!fmod_event_instance_is_playing(snd_rushdown))
fmod_event_instance_play(snd_rushdown)
fmod_event_instance_set_3d_attributes(snd_rushdown, x, y)
}
else
fmod_event_instance_stop(snd_rushdown, true)
if (state == (35 << 0))
{
if (sprite_index == spr_playerN_boxxedjetpack && (!fmod_event_instance_is_playing(snd_minijetpack)))
fmod_event_instance_play(snd_minijetpack)
fmod_event_instance_set_3d_attributes(snd_minijetpack, x, y)
if (sprite_index == spr_playerN_boxxedjetpack)
fmod_event_instance_set_parameter(snd_minijetpack, "state", 0, true)
else
fmod_event_instance_set_parameter(snd_minijetpack, "state", 1, true)
}
else if fmod_event_instance_is_playing(snd_minijetpack)
fmod_event_instance_set_parameter(snd_minijetpack, "state", 1, true)
if ((sprite_index == spr_playerN_sidewayspin || sprite_index == spr_playerN_sidewayspinend) && (state == (104 << 0) || state == (121 << 0) || ((tauntstoredstate == (104 << 0) || tauntstoredstate == (121 << 0)) && state == (61 << 0))))
{
if (!fmod_event_instance_is_playing(snd_airspin))
fmod_event_instance_play(snd_airspin)
fmod_event_instance_set_3d_attributes(snd_airspin, x, y)
}
else if fmod_event_instance_is_playing(snd_airspin)
{
if (sprite_index == spr_mach || sprite_index == spr_mach4 || sprite_index == spr_crazyrun)
fmod_event_one_shot_3d("event:/sfx/playerN/wallbounceland", x, y)
fmod_event_instance_stop(snd_airspin, true)
}
}
else
{
fmod_event_instance_stop(snd_divebomb, true)
if fmod_event_instance_get_paused(snd_wallbounce)
fmod_event_instance_set_paused(snd_wallbounce, false)
fmod_event_instance_stop(snd_wallbounce, true)
fmod_event_instance_stop(snd_noisemach, true)
fmod_event_instance_stop(snd_noiseSjump, true)
fmod_event_instance_stop(snd_minigun, true)
fmod_event_instance_stop(snd_noisefiremouth, true)
fmod_event_instance_stop(snd_airspin, true)
fmod_event_instance_stop(snd_minijetpack, true)
}
}
if (instance_exists(obj_noiseanimatroniceffect) && ((!instance_exists(obj_jumpscare)) || obj_jumpscare.sprite_index == spr_tvstatic))
{
if (!fmod_event_instance_is_playing(snd_noiseanimatronic))
fmod_event_instance_play(snd_noiseanimatronic)
fmod_event_instance_set_3d_attributes(snd_noiseanimatronic, obj_noiseanimatroniceffect.x, obj_noiseanimatroniceffect.ystart)
}
else if (state == (225 << 0) && (!instance_exists(obj_noiseanimatroniceffect)) && ((!instance_exists(obj_jumpscare)) || obj_jumpscare.sprite_index == spr_tvstatic))
{
if (!fmod_event_instance_is_playing(snd_noiseanimatronic))
fmod_event_instance_play(snd_noiseanimatronic)
fmod_event_instance_set_3d_attributes(snd_noiseanimatronic, x, y)
}
else if instance_exists(obj_noiseboss)
{
if (obj_noiseboss.sprite_index == spr_doise_deadair || obj_noiseboss.sprite_index == spr_playerN_animatronic)
{
if (!fmod_event_instance_is_playing(snd_noiseanimatronic))
fmod_event_instance_play(snd_noiseanimatronic)
fmod_event_instance_set_3d_attributes(snd_noiseanimatronic, obj_noiseboss.x, obj_noiseboss.y)
}
else
fmod_event_instance_stop(snd_noiseanimatronic, true)
}
else if instance_exists(obj_doisedead)
{
if (!fmod_event_instance_is_playing(snd_noiseanimatronic))
fmod_event_instance_play(snd_noiseanimatronic)
fmod_event_instance_set_3d_attributes(snd_noiseanimatronic, obj_doisedead.x, obj_doisedead.y)
}
else
fmod_event_instance_stop(snd_noiseanimatronic, true)
}
function textures_offload(argument0) //gml_Script_textures_offload
{
var b = instance_create(0, 0, obj_loadingscreen)
with (b)
{
group_arr = argument0
if (global.offload_tex != -4)
{
offload_arr = array_create(0)
array_copy(offload_arr, 0, global.offload_tex, 0, array_length(global.offload_tex))
global.offload_tex = -4
}
}
return b;
}
function scr_playerreset(argument0) //gml_Script_scr_playerreset
{
if (argument0 == undefined)
argument0 = true
trace("playerreset")
global.lap = false
if (room != boss_pizzaface && room != boss_noise && room != boss_pepperman && room != boss_fakepep && room != boss_vigilante)
global.bossintro = false
global.bossplayerhurt = false
global.swap_boss_damage = 0
global.playerhit = 0
global.laps = 0
global.secretfound = 0
global.combo = 0
global.highest_combo = 0
global.player_damage = 0
global.swap_damage[0] = 0
global.swap_damage[1] = 0
global.peppino_damage = 0
global.gustavo_damage = 0
anither part of the code.