1 |
if (o_coaster_controller_sneo.actcon == 1 && o_coaster_controller_sneo.timer < o_coaster_controller_sneo.timermax) |
2 |
{ |
3 |
if ((button1_p() && HeroID == 0 && gooffscreen == 0) || (button2_p() && HeroID == 1 && gooffscreen == 0) || (button3_p() && HeroID == 2 && gooffscreen == 0)) |
4 |
{ |
5 |
if (visible == 1) |
6 |
{ |
7 |
if (button1_p() && HeroID == 0) |
8 |
draw_button_press = 0; |
9 |
if (button2_p() && HeroID == 1) |
10 |
draw_button_press = 0; |
11 |
if (button3_p() && HeroID == 2) |
12 |
draw_button_press = 0; |
13 |
mykeybuffer = 3; |
14 |
o_coaster_controller_sneo.playerinput = 1; |
15 |
} |
16 |
} |
17 |
} |
18 |
if (o_coaster_controller_sneo.actcon != 0) |
19 |
actoncondelay = 1; |
20 |
if (instance_exists(obj_battleblcon)) |
21 |
actoncondelay = 0; |
22 |
if (disabled == 1) |
23 |
{ |
24 |
disabledtimer--; |
25 |
if (disabledtimer <= 0) |
26 |
disabled = 0; |
27 |
} |
28 |
if (con == 0) |
29 |
{ |
30 |
siner += 0.4; |
31 |
if (gooffscreen == 0) |
32 |
x = xstart + (sin(siner / 6) * 3); |
33 |
if (mykeybuffer > 0 && disabled == 0) |
34 |
{ |
35 |
con = 1; |
36 |
dashtimer = 0; |
37 |
damaged = 0; |
38 |
with (o_coaster_controller_sneo) |
39 |
buttonspressed += 1; |
40 |
} |
41 |
} |
42 |
if (con == 1) |
43 |
{ |
44 |
if (nitro == 0) |
45 |
{ |
46 |
hspeed += 4; |
47 |
if (hspeed > 30) |
48 |
hspeed = 30; |
49 |
} |
50 |
if (nitro == 1) |
51 |
{ |
52 |
hspeed += 8; |
53 |
if (hspeed > 60) |
54 |
hspeed = 60; |
55 |
} |
56 |
smoketimer += 2; |
57 |
if (smoketimer >= 3) |
58 |
{ |
59 |
smoke = instance_create(x + hspeed + 8, y - 10, o_coastersmoke); |
60 |
smoketimer = 0; |
61 |
} |
62 |
if (x >= (camerax() + 200)) |
63 |
con = 2; |
64 |
if (damaged == 1) |
65 |
{ |
66 |
con = 5; |
67 |
hspeed = -48; |
68 |
if (nitro == 1) |
69 |
hspeed = -200; |
70 |
} |
71 |
} |
72 |
if (con == 2) |
73 |
{ |
74 |
if (damaged == 1) |
75 |
con = 5; |
76 |
if (hspeed >= -6) |
77 |
hspeed -= 2; |
78 |
if (nitro == 1) |
79 |
{ |
80 |
hspeed -= 1; |
81 |
if (x >= (camerax() + 400) && hspeed > 0) |
82 |
hspeed = -2; |
83 |
} |
84 |
if (x <= (xstart + 10)) |
85 |
{ |
86 |
damaged = 0; |
87 |
hspeed = 0; |
88 |
siner = 0; |
89 |
con = 0; |
90 |
} |
91 |
} |
92 |
if (con == 5) |
93 |
{ |
94 |
hspeed = -30; |
95 |
if (nitro == 1) |
96 |
hspeed = -100; |
97 |
if (x <= (xstart - hspeed)) |
98 |
{ |
99 |
hspeed = 0; |
100 |
damaged = 0; |
101 |
siner = 0; |
102 |
con = 0; |
103 |
} |
104 |
} |
105 |
mykeybuffer -= 1; |
106 |
if (gooffscreen == 2) |
107 |
{ |
108 |
if (HeroID == 0) |
109 |
x -= 2; |
110 |
} |