1 | if (con == 0) |
2 | { |
3 | draw_self(); |
4 | if (fallnow == 1) |
5 | con = -5; |
6 | } |
7 | if (con == -5) |
8 | { |
9 | friction = 0.2; |
10 | remremy = y; |
11 | vspeed = -3; |
12 | hspeed = -6; |
13 | timer = 0; |
14 | con = -4; |
15 | } |
16 | if (con == -4) |
17 | { |
18 | draw_self(); |
19 | timer++; |
20 | if (timer >= 30) |
21 | { |
22 | con = -3; |
23 | timer = 0; |
24 | } |
25 | } |
26 | if (con == -3) |
27 | { |
28 | timer++; |
29 | draw_self(); |
30 | } |
31 | if (con == 1) |
32 | { |
33 | snd_play(snd_petrify); |
34 | image_index = 0; |
35 | image_speed = 0.2; |
36 | draw_self(); |
37 | timer = 0; |
38 | shaketimer = 0; |
39 | con = 4; |
40 | falltimer = 0; |
41 | remx = x; |
42 | remy = y; |
43 | } |
44 | if (con == 3) |
45 | draw_self(); |
46 | if (con == 4) |
47 | { |
48 | draw_self(); |
49 | if (image_index >= 8) |
50 | { |
51 | image_speed = 0; |
52 | image_index = 8; |
53 | } |
54 | timer++; |
55 | } |
56 | if (con == 2) |
57 | { |
58 | draw_self(); |
59 | if (image_index >= 8) |
60 | { |
61 | image_speed = 0; |
62 | image_index = 8; |
63 | if (y < (remremy + 40)) |
64 | { |
65 | gravity += 1; |
66 | } |
67 | else |
68 | { |
69 | if (bumped == 0) |
70 | { |
71 | snd_play(snd_bump); |
72 | bumped = 1; |
73 | } |
74 | gravity = 0; |
75 | vspeed = 0; |
76 | timer++; |
77 | y = remremy + 100; |
78 | } |
79 | if (timer >= 60) |
80 | { |
81 | if (bumped == 1) |
82 | { |
83 | snd_play(snd_fall); |
84 | bumped = 2; |
85 | } |
86 | image_angle += (abs(image_angle / 3) + 2); |
87 | if (image_angle >= 90) |
88 | { |
89 | if (bumped == 2) |
90 | { |
91 | snd_play(snd_bump); |
92 | bumped = 3; |
93 | } |
94 | image_angle = 90; |
95 | con = 3; |
96 | shaketimer++; |
97 | if (shaketimer >= 6) |
98 | { |
99 | con = 3; |
100 | x = remx; |
101 | y = remy; |
102 | } |
103 | } |
104 | } |
105 | } |
106 | } |
107 | if (con == 5) |
108 | { |
109 | initangle = 2; |
110 | angle = 2; |
111 | anglespeed = 0; |
112 | angleaccel = 0.015; |
113 | con = 6; |
114 | } |
115 | if (con == 6) |
116 | { |
117 | if (fallnow == 1) |
118 | { |
119 | fallnow = 2; |
120 | with (object_index) |
121 | { |
122 | if (isrouxls == 1) |
123 | drawthrash = 1; |
124 | } |
125 | } |
126 | if (fallnow == 2) |
127 | { |
128 | angle -= anglespeed; |
129 | anglespeed += ((anglespeed / 10) + angleaccel); |
130 | if (angle <= 0) |
131 | angle = 0; |
132 | } |
133 | boatcolor = merge_color(c_white, c_black, (2 - angle) / 4); |
134 | for (i = 0; i < 5; i++) |
135 | draw_sprite_ext(spr_boat_origin, image_index, x, y + i, 2, angle, 0, boatcolor, 1); |
136 | } |