1 |
if (active == true) |
2 |
{ |
3 |
if (global.interact == 0) |
4 |
{ |
5 |
t = (t + increment) % 360; |
6 |
shift = amplitude * dsin(t); |
7 |
x = xx + shift; |
8 |
if (type == 0) |
9 |
{ |
10 |
if (place_meeting(x, y, obj_caterpillarchara) || place_meeting(x, y, obj_mainchara) || place_meeting(x, y, obj_actor)) |
11 |
{ |
12 |
if (instance_exists(obj_controller_dw_mansion_east_1f_a)) |
13 |
obj_controller_dw_mansion_east_1f_a.triggered = 1; |
14 |
image_index = 1; |
15 |
snd_play(choose(snd_break1, snd_break2)); |
16 |
brokenpot = scr_dark_markerscr_dark_markerfunction scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (x, y, sprite_index); |
17 |
brokenpot.image_index = 1; |
18 |
with (brokenpot) |
19 |
scr_depth_alt(); |
20 |
if (room == room_dw_mansion_east_2f_c) |
21 |
{ |
22 |
if (instance_exists(obj_swatch_potchaser)) |
23 |
{ |
24 |
with (obj_swatch_potchaser) |
25 |
{ |
26 |
newenem = instance_create(x, y, obj_chaseenemy); |
27 |
with (newenem) |
28 |
{ |
29 |
if (other.sprite_index == spr_npc_swatchling_scared) |
30 |
{ |
31 |
if (other.image_xscale == -2) |
32 |
{ |
33 |
x = other.x - 110; |
34 |
y = other.y + 2; |
35 |
} |
36 |
else |
37 |
{ |
38 |
x = other.x - 12; |
39 |
y = other.y + 2; |
40 |
} |
41 |
} |
42 |
else if (other.image_xscale == -2) |
43 |
{ |
44 |
x = other.x - 142; |
45 |
y = other.y; |
46 |
} |
47 |
else |
48 |
{ |
49 |
x = other.x + 24; |
50 |
y = other.y; |
51 |
} |
52 |
myencounter = 56; |
53 |
sprite_index = spr_npc_swatchling_sweep_walk; |
54 |
touchsprite = spr_npc_swatchling_sweep_walk; |
55 |
radius = 10000; |
56 |
ignoresolid = 1; |
57 |
alertcon = 0; |
58 |
eraser = 1; |
59 |
facing = 1; |
60 |
} |
61 |
instance_destroy(); |
62 |
} |
63 |
} |
64 |
if (instance_exists(obj_controller_dw_mansion_potBalance)) |
65 |
obj_controller_dw_mansion_potBalance.triggered = 1; |
66 |
} |
67 |
active = false; |
68 |
} |
69 |
} |
70 |
if (type == 1) |
71 |
{ |
72 |
if (con == 0) |
73 |
{ |
74 |
if (place_meeting(x, y, obj_caterpillarchara) || place_meeting(x, y, obj_mainchara) || place_meeting(x, y, obj_actor)) |
75 |
{ |
76 |
active = false; |
77 |
global.interact = 1; |
78 |
con = 1; |
79 |
} |
80 |
} |
81 |
} |
82 |
} |
83 |
} |
84 |
else |
85 |
{ |
86 |
image_index = 1; |
87 |
} |
88 |
if (x > xprevious) |
89 |
going = "right"; |
90 |
if (x < xprevious) |
91 |
going = "left"; |
92 |
tellspeed = x - xprevious; |
93 |
if (con == 1) |
94 |
{ |
95 |
pipismarker = scr_dark_markerscr_dark_markerfunction scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (x, y - (sprite_height / 2), spr_pipis_egg); |
96 |
wheel1 = scr_markerscr_markerfunction scr_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
}
return thismarker;
} (x - 8, (y - 8) + (active * 8), spr_thrash_wheel); |
97 |
wheel2 = scr_markerscr_markerfunction scr_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
}
return thismarker;
} (x + 8, (y - 8) + (active * 8), spr_thrash_wheel); |
98 |
wheel1.hspeed = 16; |
99 |
wheel2.hspeed = -16; |
100 |
wheel1.friction = 0.5; |
101 |
wheel2.friction = 0.5; |
102 |
wheel1.depth = depth + 10; |
103 |
wheel2.depth = depth - 10; |
104 |
scr_doomscr_doomfunction scr_doom(arg0, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{alarm[0]
target = arg0;
}
} (wheel1, 30); |
105 |
scr_doomscr_doomfunction scr_doom(arg0, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{alarm[0]
target = arg0;
}
} (wheel2, 30); |
106 |
scr_darksize(pipismarker); |
107 |
visible = false; |
108 |
myinteract = 0; |
109 |
snd_play_pitch(snd_spamton_laugh, 1.4); |
110 |
con = 2; |
111 |
timer = 0; |
112 |
boss = 1; |
113 |
} |
114 |
if (con == 2) |
115 |
{ |
116 |
timer++; |
117 |
if (timer == 15) |
118 |
{ |
119 |
alarm[4] = 30; |
120 |
global.flag[9 battle_music] = 2; |
121 |
scr_battlescr_battlefunction scr_battle(arg0, arg1, arg2, arg3, arg4)
{
global.specialbattle = arg1;
global.encounterno = arg0;
if ( global.flag[9 battle_music] != 2)
{
global.flag[9 battle_music] = 1;
global.batmusic[0] = snd_init("battle.ogg");
}
instance_create(0, 0, obj_battleback);
instance_create(0, 0, obj_encounterbasic);
__enemymarker[0] = arg2;
__enemymarker[1] = arg3;
__enemymarker[2] = arg4;
for (__ien = 0; __ien < 3; __ien++)
{
if (global.monstertype[__ien] != 0 (None))
{
if (!i_ex(__enemymarker[__ien]))
{
__enemymarker[__ien] = scr_dark_marker(global.monstermakex[__ien] + 300, global.monstermakey[__ien], object_get_sprite(global.monsterinstancetype[__ien]));
__enemymarker[__ien].depth = -__ien;
}
__enemymarker[__ien].__ien = __ien;
with (__enemymarker[__ien])
{
scr_move_to_point_over_time(global.monstermakex[__ien], global.monstermakey[__ien], 20);
__doom = instance_create(x, y, obj_doom);
__doom.target = id;
__doom.alarm[0] = 25;
}
}
}
} (102, 0, pipismarker, 0, 0); |
122 |
} |
123 |
} |
124 |
if (con == 3) |
125 |
instance_destroy(); |
126 |
if (con == 999) |
127 |
{ |
128 |
snd_play(choose(snd_break1, snd_break2)); |
129 |
active = false; |
130 |
brokenpot = scr_dark_markerscr_dark_markerfunction scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (x, y, sprite_index); |
131 |
brokenpot.image_index = 1; |
132 |
with (brokenpot) |
133 |
scr_depth_alt(); |
134 |
visible = false; |
135 |
if (i_ex(mySwatch)) |
136 |
{ |
137 |
with (mySwatch) |
138 |
{ |
139 |
fader = instance_create(x, y, obj_marker); |
140 |
fader.sprite_index = sprite_index; |
141 |
fader.image_index = image_index; |
142 |
fader.image_xscale = image_xscale; |
143 |
fader.image_yscale = image_yscale; |
144 |
fader.image_speed = 0; |
145 |
fader.gravity = random_range(-1.2, -1.5); |
146 |
scr_doomscr_doomfunction scr_doom(arg0, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{alarm[0]
target = arg0;
}
} (fader, 90); |
147 |
snd_play_x(snd_weirdeffect, 0.35, 1.8); |
148 |
instance_destroy(); |
149 |
} |
150 |
} |
151 |
wheel1 = scr_markerscr_markerfunction scr_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
}
return thismarker;
} (x - 8, (y - 8) + (active * 8), spr_thrash_wheel); |
152 |
wheel2 = scr_markerscr_markerfunction scr_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
}
return thismarker;
} (x + 8, (y - 8) + (active * 8), spr_thrash_wheel); |
153 |
wheel1.gravity = -1.2; |
154 |
wheel2.gravity = -1.1; |
155 |
wheel1.depth = depth + 10; |
156 |
wheel2.depth = depth - 10; |
157 |
scr_doomscr_doomfunction scr_doom(arg0, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{alarm[0]
target = arg0;
}
} (wheel1, 90); |
158 |
scr_doomscr_doomfunction scr_doom(arg0, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{alarm[0]
target = arg0;
}
} (wheel2, 90); |
159 |
var speedrunners = "satiated"; |
160 |
con = -999; |
161 |
instance_destroy(); |
162 |
} |
163 |
if (con == 9999) |
164 |
{ |
165 |
pipismarker = scr_dark_markerscr_dark_markerfunction scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (x, y - (sprite_height / 2), spr_pipis_egg); |
166 |
pipismarker.gravity = -1.2; |
167 |
pipismarker.depth = depth; |
168 |
scr_darksize(pipismarker); |
169 |
scr_doomscr_doomfunction scr_doom(arg0, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{alarm[0]
target = arg0;
}
} (pipismarker, 90); |
170 |
wheel1 = scr_markerscr_markerfunction scr_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
}
return thismarker;
} (x - 8, (y - 8) + (active * 8), spr_thrash_wheel); |
171 |
wheel2 = scr_markerscr_markerfunction scr_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
}
return thismarker;
} (x + 8, (y - 8) + (active * 8), spr_thrash_wheel); |
172 |
wheel1.hspeed = 16; |
173 |
wheel2.hspeed = -16; |
174 |
wheel1.friction = -0.1; |
175 |
wheel2.friction = -0.1; |
176 |
wheel1.depth = depth + 10; |
177 |
wheel2.depth = depth - 10; |
178 |
scr_doomscr_doomfunction scr_doom(arg0, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{alarm[0]
target = arg0;
}
} (wheel1, 90); |
179 |
scr_doomscr_doomfunction scr_doom(arg0, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{alarm[0]
target = arg0;
}
} (wheel2, 90); |
180 |
visible = false; |
181 |
snd_play_pitch(snd_spamton_laugh, 1.4); |
182 |
instance_destroy(); |
183 |
} |