1 |
var box = obj_dialogue_box_battle_transformation_any |
2 |
switch scene |
3 |
{ |
4 |
case 0: |
5 |
depth = obj_heart_battle_fighting_parent.depth - 1 |
6 |
switch launch_dir |
7 |
{ |
8 |
case "down": |
9 |
x = clamp(x, (box.bbox_left + 32), (box.bbox_right - 32)) |
10 |
vspeed = launch_speed |
11 |
image_angle = 0 |
12 |
if (y >= (box.bbox_bottom - 4)) |
13 |
{ |
14 |
y = box.bbox_bottom - 4 |
15 |
vspeed = 0 |
16 |
scene = 1 |
17 |
} |
18 |
break |
19 |
case "right": |
20 |
y = clamp(y, (box.bbox_top + 32), (box.bbox_bottom - 32)) |
21 |
hspeed = launch_speed |
22 |
image_angle = 90 |
23 |
if (x >= (box.bbox_right - 4)) |
24 |
{ |
25 |
x = box.bbox_right - 4 |
26 |
hspeed = 0 |
27 |
scene = 1 |
28 |
} |
29 |
break |
30 |
case "up": |
31 |
x = clamp(x, (box.bbox_left + 32), (box.bbox_right - 32)) |
32 |
vspeed = (-launch_speed) |
33 |
image_angle = 180 |
34 |
if (y <= (box.bbox_top + 4)) |
35 |
{ |
36 |
y = box.bbox_top + 4 |
37 |
vspeed = 0 |
38 |
scene = 1 |
39 |
} |
40 |
break |
41 |
case "left": |
42 |
y = clamp(y, (box.bbox_top + 32), (box.bbox_bottom - 32)) |
43 |
hspeed = (-launch_speed) |
44 |
image_angle = 270 |
45 |
if (x <= (box.bbox_left + 4)) |
46 |
{ |
47 |
x = box.bbox_left + 4 |
48 |
hspeed = 0 |
49 |
scene = 1 |
50 |
} |
51 |
break |
52 |
} |
53 |
|
54 |
break |
55 |
case 1: |
56 |
audio_play_sound(snd_guardener_arm_land, 1, 0) |
57 |
audio_stop_sound(snd_guardener_arm_launched) |
58 |
scr_screenshake_battlescr_screenshake_battlefunction scr_screenshake_battle() //gml_Script_scr_screenshake_battle
{
instance_destroy(obj_screenshake_battle)
var screenshake = instance_create(0, 0, obj_screenshake_battle)
battle_screenshake_duration = argument[0]
battle_screenshake_intensity = argument[1]
battle_screenshake_dec = battle_screenshake_intensity / battle_screenshake_duration
} (6, 1) |
59 |
var smoke = instance_create_depth(x, y, (depth - 1), obj_battle_enemy_attack_guardener_arm_smoke) |
60 |
smoke.image_angle = image_angle |
61 |
sprite_index = spr_attack_guardener_arm_land |
62 |
image_index = 0 |
63 |
scene++ |
64 |
break |
65 |
case 2: |
66 |
if (image_index >= (image_number - 1)) |
67 |
{ |
68 |
image_index = image_number - 1 |
69 |
image_speed = 0 |
70 |
} |
71 |
if (arm_return > 0) |
72 |
{ |
73 |
if (!alarm[1]) |
74 |
alarm[1] = arm_return |
75 |
} |
76 |
break |
77 |
case 3: |
78 |
switch launch_dir |
79 |
{ |
80 |
case "down": |
81 |
vspeed = (-launch_speed) |
82 |
if (y <= ystart) |
83 |
instance_destroy() |
84 |
break |
85 |
case "right": |
86 |
hspeed = (-launch_speed) |
87 |
if (x <= xstart) |
88 |
instance_destroy() |
89 |
break |
90 |
case "up": |
91 |
vspeed = launch_speed |
92 |
if (y >= ystart) |
93 |
instance_destroy() |
94 |
break |
95 |
case "left": |
96 |
hspeed = (-launch_speed) |
97 |
if (x <= xstart) |
98 |
instance_destroy() |
99 |
break |
100 |
} |
101 |
|
102 |
break |
103 |
} |