1 |
if (maxer < 1.1) |
2 |
maxer += 0.1; |
3 |
image_xscale = maxer + (sin(siner / 6) * 0.1); |
4 |
image_yscale = maxer + (sin(siner / 6) * 0.1); |
5 |
xprev4 = xprev3; |
6 |
yprev4 = yprev3; |
7 |
xprev3 = xprev2; |
8 |
yprev3 = yprev2; |
9 |
xprev2 = xprevious; |
10 |
yprev2 = yprevious; |
11 |
siner += 1; |
12 |
pb = bounces; |
13 |
if (bounces < 7) |
14 |
{ |
15 |
if (x > (room_width - 20) && hspeed > 0) |
16 |
{ |
17 |
hspeed = -hspeed; |
18 |
bounces += 1; |
19 |
} |
20 |
} |
21 |
if (bounces < 7) |
22 |
{ |
23 |
if (x < 20 && hspeed < 0) |
24 |
{ |
25 |
hspeed = -hspeed; |
26 |
bounces += 1; |
27 |
} |
28 |
} |
29 |
if (bounces < 7) |
30 |
{ |
31 |
if (vspeed > 0 && y > (room_height - 20)) |
32 |
{ |
33 |
vspeed = -vspeed; |
34 |
bounces += 1; |
35 |
} |
36 |
} |
37 |
if (bounces < 7) |
38 |
{ |
39 |
if (vspeed < 0 && y < 20) |
40 |
{ |
41 |
bounces += 1; |
42 |
vspeed = -vspeed; |
43 |
} |
44 |
} |
45 |
if (bounces > pb) |
46 |
{ |
47 |
if (instance_exists(obj_vsflowey_shaker) == 0) |
48 |
{ |
49 |
instance_create(0, 0, obj_vsflowey_shaker); |
50 |
snd_play(snd_impact); |
51 |
} |
52 |
} |
53 |
if (x > (room_width + 300)) |
54 |
event_user(7); |
55 |
if (x < -300) |
56 |
event_user(7); |