1 |
if (timer < timermax && buttonspressed <= 5 && instance_exists(obj_berdlyb_enemy)) |
2 |
{ |
3 |
if (obj_berdlyb_enemy.kriscoaster == 0 && krisgooffscreen == 1) |
4 |
{ |
5 |
if (HeroCoaster[0].x > (camerax() - 120)) |
6 |
{ |
7 |
HeroCoaster[0].x -= 10 |
8 |
HeroCoaster[0].gooffscreen = 1 |
9 |
} |
10 |
} |
11 |
if (obj_berdlyb_enemy.suscoaster == 0 && susiegooffscreen == 1) |
12 |
{ |
13 |
if (HeroCoaster[1].x > (camerax() - 120)) |
14 |
{ |
15 |
HeroCoaster[1].x -= 10 |
16 |
HeroCoaster[1].gooffscreen = 1 |
17 |
} |
18 |
} |
19 |
if (obj_berdlyb_enemy.ralcoaster == 0 && ralseigooffscreen == 1) |
20 |
{ |
21 |
if (HeroCoaster[2].x > (camerax() - 120)) |
22 |
{ |
23 |
HeroCoaster[2].x -= 10 |
24 |
HeroCoaster[2].gooffscreen = 1 |
25 |
} |
26 |
} |
27 |
} |
28 |
if (timer > timermax && buttonspressed > 5) |
29 |
{ |
30 |
if (HeroCoaster[0].x < HeroCoaster[0].xstart && HeroCoaster[0].gooffscreen == 1) |
31 |
HeroCoaster[0].x += 30 |
32 |
if (HeroCoaster[1].x < HeroCoaster[1].xstart && HeroCoaster[1].gooffscreen == 1) |
33 |
HeroCoaster[1].x += 30 |
34 |
if (HeroCoaster[2].x < HeroCoaster[2].xstart && HeroCoaster[2].gooffscreen == 1) |
35 |
HeroCoaster[2].x += 30 |
36 |
if (HeroCoaster[0].x > HeroCoaster[0].xstart && HeroCoaster[0].gooffscreen == 1) |
37 |
HeroCoaster[0].x = HeroCoaster[0].xstart |
38 |
if (HeroCoaster[1].x > HeroCoaster[1].xstart && HeroCoaster[1].gooffscreen == 1) |
39 |
HeroCoaster[1].x = HeroCoaster[1].xstart |
40 |
if (HeroCoaster[2].x > HeroCoaster[2].xstart && HeroCoaster[2].gooffscreen == 1) |
41 |
HeroCoaster[2].x = HeroCoaster[2].xstart |
42 |
} |
43 |
if (playerinputtimer < 12 || actcon == 1) |
44 |
playerinputtimer++ |
45 |
if (playerinputtimer == 150) |
46 |
playerinput = 1 |
47 |
if (playerinput == 1) |
48 |
timer++ |
49 |
if (buttonspressed <= 5 && timer > (timermax - 2)) |
50 |
timer = timermax - 2 |
51 |
if (o_coaster_berdly.forceypos != -1 && buttonspressed > 2 && buttonspressed < 6) |
52 |
{ |
53 |
buttonspressed = 6 |
54 |
if (timer < timermax) |
55 |
timer = timermax |
56 |
} |
57 |
if (timer >= timermax && buttonspressed > 5) |
58 |
{ |
59 |
with (o_coaster_lightning) |
60 |
instance_destroy() |
61 |
with (o_coaster_jama) |
62 |
instance_destroy() |
63 |
with (obj_berdlyparticle) |
64 |
instance_destroy() |
65 |
with (o_coastersmoke) |
66 |
instance_destroy() |
67 |
with (obj_writer) |
68 |
instance_destroy() |
69 |
if (timer >= (timermax + 10)) |
70 |
{ |
71 |
krisgooffscreen = 0 |
72 |
susiegooffscreen = 0 |
73 |
ralseigooffscreen = 0 |
74 |
HeroCoaster[0].gooffscreen = 0 |
75 |
HeroCoaster[1].gooffscreen = 0 |
76 |
HeroCoaster[2].gooffscreen = 0 |
77 |
with (o_coaster_hero) |
78 |
forceact = 0 |
79 |
if (HeroCoaster[0].con == 0 && HeroCoaster[1].con == 0 && HeroCoaster[2].con == 0) |
80 |
{ |
81 |
buttonspressed = 0 |
82 |
with (obj_berdlyb_enemy) |
83 |
{ |
84 |
bumpwait = 1 |
85 |
alarm[7] |
86 |
acting = 0 |
87 |
actcon = 1 |
88 |
actconsus = 0 |
89 |
actconral = 0 |
90 |
rideactgo = 0 |
91 |
bumpactstarted = 0 |
92 |
with (o_coaster_hero) |
93 |
{ |
94 |
dontshowherosprite = 30 |
95 |
draw_button_press = 0 |
96 |
} |
97 |
if (global.mercymod[myself] < global.mercymax[myself]) |
98 |
scr_mercyaddscr_mercyaddfunction scr_mercyadd(argument0, argument1) //gml_Script_scr_mercyadd
{
global.mercymod[argument0] += argument1
if (global.mercymod[argument0] < 0)
global.mercymod[argument0] = 0
if (global.mercymod[argument0] >= 100)
global.mercymod[argument0] = 100
var _playsound = 1
if (argument1 <= 0)
_playsound = 0
if i_ex(obj_dmgwriter)
{
with (obj_dmgwriter)
{
if (type == 5)
_playsound = 0
}
}
if _playsound
{
var _pitch = 0.8
if (argument1 < 99)
_pitch = 1
if (argument1 <= 50)
_pitch = 1.2
if (argument1 <= 25)
_pitch = 1.4
snd_play_x(snd_mercyadd, 0.8, _pitch)
}
__mercydmgwriter = instance_create(global.monsterx[argument0], (global.monstery[argument0] + 20 - global.hittarget[argument0] * 20), obj_dmgwriter)
__mercydmgwriter.damage = argument1
__mercydmgwriter.type = 5
global.hittarget[argument0] = global.hittarget[argument0] + 1
} (myself, o_coaster_controller.bumpmercy) |
99 |
if (global.mercymod[myself] >= 100) |
100 |
event_user(10) |
101 |
} |
102 |
bumpmercy = 0 |
103 |
actcon = 0 |
104 |
} |
105 |
} |
106 |
} |