20
spawn('missile', midpoint_x + facing*20, midpoint_y, facing,
21
[set(velocity_x, 800*facing)]),
22
spawn('explosion_spark', midpoint_x + facing*40, midpoint_y-10, facing)]"
24
spawn('missile', midpoint_x + facing*20, midpoint_y - 20, facing,
25
[set(velocity_x, 500*facing),
26
set(velocity_y, -500),
27
set(rotate, -facing*45)]),
28
spawn('explosion_spark', midpoint_x + facing*30, midpoint_y-40, facing)]"
29
on_shoot_vert="[spawn('missile', midpoint_x, y - 15, facing,
30
[set(velocity_y, -800), set(rotate, 90)]),
31
spawn('explosion_spark', midpoint_x, midpoint_y-40, facing)]"
33
on_end_anim="switch(animation,
34
'fire_horz', animation('aim_horz'),
35
'fire_diag', animation('aim_diag'),
36
'fire_vert', animation('aim_vert'),
38
[if(preferred_aim = current_aim, [animation(animation)],
39
switch(if(preferred_aim < current_aim, current_aim - 1,
41
0, [facing(-1), animation('aim_horz')],
42
1, [facing(-1), animation('aim_diag')],
43
2, [facing(-1), animation('aim_vert')],
44
3, [facing(1), animation('aim_diag')],
45
4, [facing(1), animation('aim_horz')])),
46
if(vars.load >= vars.loading_time, [set_var('load', 0),
47
animation(switch(animation,
48
'aim_horz', 'fire_horz',
49
'aim_diag', 'fire_diag',
50
'aim_vert', 'fire_vert'))
52
set_var('load', vars.load + 1))]
55
if(level.player.y2 > y, if(level.player.x < x, 0, 4),
56
if(level.player.x2 > x and level.player.x < x2, 2,
57
if(level.player.x < x, 1, 3))),
58
current_aim = switch(animation,
60
'aim_diag', if(facing < 0, 1, 3),
61
'aim_horz', if(facing < 0, 0, 4))"
67
image=enemies/cannon.png
73
image=enemies/cannon.png
79
image=enemies/cannon.png
86
image=enemies/cannon.png
97
image=enemies/cannon.png
103
events="5:shoot_diag"
108
image=enemies/cannon.png
114
events="5:shoot_vert"