1 |
function scr_cutscene_battle_martlet_final_2_introscr_cutscene_battle_martlet_final_2_introfunction scr_cutscene_battle_martlet_final_2_intro() //gml_Script_scr_cutscene_battle_martlet_final_2_intro
{
if live_call()
return global.live_result;
switch scene
{
case 0:
if cutscene_wait(1.5)
draw_enabled = true
break
case 1:
if (message_current == 8)
{
draw_enabled = false
scr_battle_box_resize_midfight(82, 160, 320, 300)
cutscene_wait(1.5)
}
break
case 2:
obj_martlet_final_2_base.sprite_index = spr_martlet_f2_start
obj_martlet_final_2_base.image_index = 0
obj_martlet_final_2_base.image_speed = 1
cutscene_advance()
break
case 3:
if (obj_martlet_final_2_base.image_index >= (obj_martlet_final_2_base.image_number - 1))
{
obj_martlet_final_2_base.image_speed = 0
obj_martlet_final_2_base.image_index = obj_martlet_final_2_base.image_number - 1
cutscene_advance()
}
break
case 4:
draw_enabled = true
skippable = true
cutscene_advance()
break
case 5:
if (message_current == 10)
{
if (!audio_is_playing(mus_retribution))
global.battle_music = audio_play_sound(mus_retribution, 1, 1)
skippable = false
cutscene_wait(0.75)
}
break
case 6:
draw_enabled = false
shake_strength = 0
cutscene_wait(0.75)
break
case 7:
obj_martlet_final_2_base.x = obj_martlet_final_2_base.xstart + (random_range((-shake_strength), shake_strength))
obj_martlet_final_2_base.y = obj_martlet_final_2_base.ystart + (random_range((-shake_strength), shake_strength))
shake_strength += 0.025
if (audio_sound_get_track_position(global.battle_music) >= 4.85)
cutscene_advance()
break
case 8:
audio_play_sound(snd_ceroba_yell, 1, 0)
var flash_sound = audio_play_sound(snd_undertale_flash, 1, 0)
audio_sound_gain(flash_sound, 0.7, 0)
scr_screenshake_battle_custom(6, 3)
obj_martlet_final_2_base.martlet_sprites_reset = true
cutscene_advance()
break
case 9:
cutscene_wait(1)
break
case 10:
cutscene_advance()
break
case 11:
fade_out_gui = false
obj_martlet_final_bg.fade_out = false
obj_dialogue_box_battle_transformation_any.visible = true
obj_dialogue_box_battle_transformation_any.depth = -1
obj_heart_battle_fighting_parent.moveable = true
global.image_alpha_enemy_attacking = 0
cutscene_advance()
break
case 12:
global.image_alpha_enemy_attacking += 0.1
if (global.image_alpha_enemy_attacking >= 0.5)
{
instance_destroy(obj_quote_bubble_battle_yellow_3)
instance_destroy()
}
break
}
} () //gml_Script_scr_cutscene_battle_martlet_final_2_intro |
2 |
{ |
3 |
if live_call() |
4 |
return global.live_result; |
5 |
switch scene |
6 |
{ |
7 |
case 0: |
8 |
if cutscene_wait(1.5) |
9 |
draw_enabled = true |
10 |
break |
11 |
case 1: |
12 |
if (message_current == 8) |
13 |
{ |
14 |
draw_enabled = false |
15 |
scr_battle_box_resize_midfightscr_battle_box_resize_midfightfunction scr_battle_box_resize_midfight() //gml_Script_scr_battle_box_resize_midfight
{
if instance_exists(obj_dialogue_box_battle_transformation_any)
{
with (obj_dialogue_box_battle_transformation_any)
{
battle_box_resize_midfight = true
battle_box_target_xscale = argument[0] / sprite_get_width(sprite_index)
battle_box_target_yscale = argument[1] / sprite_get_height(sprite_index)
if (argument_count > 2)
{
battle_box_target_x = argument[2]
battle_box_target_y = argument[3]
}
if (abs(image_xscale - battle_box_target_xscale) < 0.01 && abs(image_yscale - battle_box_target_yscale) < 0.01 && abs(x - battle_box_target_x) < 0.1 && abs(y - battle_box_target_y) < 0.1)
{
var box = obj_dialogue_box_battle_transformation_any
global.attack_surface_width = box.sprite_width - 8
global.attack_surface_height = box.sprite_height - 8
global.attack_surface_x = box.x - global.attack_surface_width * 0.5
global.attack_surface_y = box.y - global.attack_surface_height * 0.5
if surface_exists(global.attack_surface)
global.attack_surface = surface_create(global.attack_surface_width, global.attack_surface_height)
return true;
}
}
}
else
return false;
} (82, 160, 320, 300) |
16 |
cutscene_wait(1.5) |
17 |
} |
18 |
break |
19 |
case 2: |
20 |
obj_martlet_final_2_base.sprite_index = spr_martlet_f2_start |
21 |
obj_martlet_final_2_base.image_index = 0 |
22 |
obj_martlet_final_2_base.image_speed = 1 |
23 |
cutscene_advance() |
24 |
break |
25 |
case 3: |
26 |
if (obj_martlet_final_2_base.image_index >= (obj_martlet_final_2_base.image_number - 1)) |
27 |
{ |
28 |
obj_martlet_final_2_base.image_speed = 0 |
29 |
obj_martlet_final_2_base.image_index = obj_martlet_final_2_base.image_number - 1 |
30 |
cutscene_advance() |
31 |
} |
32 |
break |
33 |
case 4: |
34 |
draw_enabled = true |
35 |
skippable = true |
36 |
cutscene_advance() |
37 |
break |
38 |
case 5: |
39 |
if (message_current == 10) |
40 |
{ |
41 |
if (!audio_is_playing(mus_retribution)) |
42 |
global.battle_music = audio_play_sound(mus_retribution, 1, 1) |
43 |
skippable = false |
44 |
cutscene_wait(0.75) |
45 |
} |
46 |
break |
47 |
case 6: |
48 |
draw_enabled = false |
49 |
shake_strength = 0 |
50 |
cutscene_wait(0.75) |
51 |
break |
52 |
case 7: |
53 |
obj_martlet_final_2_base.x = obj_martlet_final_2_base.xstart + (random_range((-shake_strength), shake_strength)) |
54 |
obj_martlet_final_2_base.y = obj_martlet_final_2_base.ystart + (random_range((-shake_strength), shake_strength)) |
55 |
shake_strength += 0.025 |
56 |
if (audio_sound_get_track_position(global.battle_music) >= 4.85) |
57 |
cutscene_advance() |
58 |
break |
59 |
case 8: |
60 |
audio_play_sound(snd_ceroba_yell, 1, 0) |
61 |
var flash_sound = audio_play_sound(snd_undertale_flash, 1, 0) |
62 |
audio_sound_gain(flash_sound, 0.7, 0) |
63 |
scr_screenshake_battle_customscr_screenshake_battle_customfunction scr_screenshake_battle_custom() //gml_Script_scr_screenshake_battle_custom
{
instance_destroy(obj_screenshake_battle)
var screenshake = instance_create(0, 0, obj_screenshake_battle)
screenshake.battle_screenshake_duration = argument[0]
screenshake.battle_screenshake_intensity = argument[1]
screenshake.battle_screenshake_dec = screenshake.battle_screenshake_intensity / screenshake.battle_screenshake_duration
} (6, 3) |
64 |
obj_martlet_final_2_base.martlet_sprites_reset = true |
65 |
cutscene_advance() |
66 |
break |
67 |
case 9: |
68 |
cutscene_wait(1) |
69 |
break |
70 |
case 10: |
71 |
cutscene_advance() |
72 |
break |
73 |
case 11: |
74 |
fade_out_gui = false |
75 |
obj_martlet_final_bg.fade_out = false |
76 |
obj_dialogue_box_battle_transformation_any.visible = true |
77 |
obj_dialogue_box_battle_transformation_any.depth = -1 |
78 |
obj_heart_battle_fighting_parent.moveable = true |
79 |
global.image_alpha_enemy_attacking = 0 |
80 |
cutscene_advance() |
81 |
break |
82 |
case 12: |
83 |
global.image_alpha_enemy_attacking += 0.1 |
84 |
if (global.image_alpha_enemy_attacking >= 0.5) |
85 |
{ |
86 |
instance_destroy(obj_quote_bubble_battle_yellow_3) |
87 |
instance_destroy() |
88 |
} |
89 |
break |
90 |
} |
91 |
|
92 |
} |