1 |
checkx = x + 10; |
2 |
checky = y + 20; |
3 |
event_user(0); |
4 |
mytile = thistile; |
5 |
if (mytile == 0) |
6 |
{ |
7 |
if (moving == 1) |
8 |
{ |
9 |
if (moving == 1) |
10 |
global.facing = 1; |
11 |
if (moving == 3) |
12 |
global.facing = 3; |
13 |
moving = 0; |
14 |
speed = 0; |
15 |
obj_mainchara.visible = true; |
16 |
obj_mainchara.phasing = 0; |
17 |
global.interact = 0; |
18 |
instance_destroy(); |
19 |
} |
20 |
} |
21 |
if (mytile == 1) |
22 |
moving = 0; |
23 |
if (mytile == 3) |
24 |
{ |
25 |
if (orange != 0) |
26 |
{ |
27 |
snd_play(snd_bell); |
28 |
image_speed = 0; |
29 |
with (tileid) |
30 |
{ |
31 |
af = instance_create(x, y, obj_genafterimage); |
32 |
af.sprite_index = spr_tilewhite; |
33 |
af.depth = depth - 1; |
34 |
} |
35 |
image_blend = yblend; |
36 |
} |
37 |
orange = 0; |
38 |
mytile = 0; |
39 |
tileid2 = tileid; |
40 |
if (moving == 1) |
41 |
{ |
42 |
checkx = x + 30; |
43 |
checky = y + 20; |
44 |
} |
45 |
if (moving == 2) |
46 |
{ |
47 |
checkx = x + 10; |
48 |
checky = y - 5; |
49 |
} |
50 |
if (moving == 3) |
51 |
{ |
52 |
checkx = x - 10; |
53 |
checky = y + 20; |
54 |
} |
55 |
if (moving == 4) |
56 |
{ |
57 |
checkx = x + 10; |
58 |
checky = y + 35; |
59 |
} |
60 |
event_user(0); |
61 |
mytile2 = thistile; |
62 |
if (mytile2 != 0 && mytile2 != 2) |
63 |
{ |
64 |
with (tileid2) |
65 |
{ |
66 |
af = instance_create(x + 10, y + 10, obj_genafterimage); |
67 |
af.sprite_index = spr_tilearrow; |
68 |
af.depth = depth - 2; |
69 |
af.image_angle = -90 + (obj_tileguy.moving * 90); |
70 |
af.direction = -90 + (obj_tileguy.moving * 90); |
71 |
af.image_alpha = 2; |
72 |
af.speed = obj_tileguy.speed / 3; |
73 |
} |
74 |
prevx = x; |
75 |
prevy = y; |
76 |
} |
77 |
else |
78 |
{ |
79 |
moving = 0; |
80 |
} |
81 |
} |
82 |
if (mytile == 4) |
83 |
{ |
84 |
if (electrocute == 0) |
85 |
{ |
86 |
snd_play(snd_shock); |
87 |
with (tileid) |
88 |
{ |
89 |
ga = instance_create(x, y, obj_genanim); |
90 |
ga.sprite_index = spr_tileyellow_shock; |
91 |
ga.image_speed = 1; |
92 |
if (sprite_index == spr_tileblue) |
93 |
ga.sprite_index = spr_tileyellow_shock_blue; |
94 |
} |
95 |
electrocute = 1; |
96 |
alarm[5] = 10;gml_Object_obj_tileguy_Alarm_5.gmlmoved = 0;
prevx = x;
prevy = y;
if (moving == 1 && moved == 0)
{
moving = 3;
moved = 1;
}
if (moving == 2 && moved == 0)
{
moving = 4;
moved = 1;
}
if (moving == 3 && moved == 0)
{
moving = 1;
moved = 1;
}
if (moving == 4 && moved == 0)
{
moving = 2;
moved = 1;
}
electrocute = 0; |
97 |
} |
98 |
} |
99 |
if (mytile == 5) |
100 |
{ |
101 |
moving = 0; |
102 |
if (orange != 1) |
103 |
{ |
104 |
image_blend = oblend; |
105 |
snd_play(snd_bell); |
106 |
with (tileid) |
107 |
{ |
108 |
af = instance_create(x, y, obj_genafterimage); |
109 |
af.sprite_index = spr_tilewhite; |
110 |
af.depth = depth - 1; |
111 |
} |
112 |
} |
113 |
orange = 1; |
114 |
} |
115 |
if (mytile == 6) |
116 |
{ |
117 |
if (orange == 1) |
118 |
{ |
119 |
if (electrocute == 0) |
120 |
{ |
121 |
pir += 1; |
122 |
dogchance = 0; |
123 |
if (pir > 8) |
124 |
dogchance = random(5); |
125 |
if (dog == 1) |
126 |
dogchance = 0; |
127 |
with (tileid) |
128 |
{ |
129 |
ga = instance_create(x, y, obj_genanim); |
130 |
ga.sprite_index = spr_pirahna_anim_wip; |
131 |
if (obj_tileguy.dogchance > 4) |
132 |
{ |
133 |
ga.sprite_index = spr_emergentdog; |
134 |
obj_tileguy.dog = 1; |
135 |
} |
136 |
ga.image_speed = 1; |
137 |
} |
138 |
snd_play(snd_b); |
139 |
electrocute = 1; |
140 |
alarm[5] = 2;gml_Object_obj_tileguy_Alarm_5.gmlmoved = 0;
prevx = x;
prevy = y;
if (moving == 1 && moved == 0)
{
moving = 3;
moved = 1;
}
if (moving == 2 && moved == 0)
{
moving = 4;
moved = 1;
}
if (moving == 3 && moved == 0)
{
moving = 1;
moved = 1;
}
if (moving == 4 && moved == 0)
{
moving = 2;
moved = 1;
}
electrocute = 0; |
141 |
} |
142 |
} |
143 |
else |
144 |
{ |
145 |
moving = 0; |
146 |
} |
147 |
} |
148 |
if (mytile == 7) |
149 |
{ |
150 |
with (tileid) |
151 |
{ |
152 |
af = instance_create(x, y, obj_genafterimage); |
153 |
af.sprite_index = spr_tilewhite; |
154 |
af.depth = depth - 1; |
155 |
} |
156 |
global.flag[289 stepped_green_tile] = 1; |
157 |
snd_play(snd_yeah); |
158 |
moving = 0; |
159 |
} |