Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_mecha_frog_cockpit_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
switch scene
4
{
5
    case 0:
6
        var is_punched = false
7
        with (obj_battle_enemy_attack_mecha_frog_hand)
8
        {
9
            if (place_meeting(x, y, other) && state == "punch")
10
                is_punched = true
11
        }
12
        if is_punched
13
        {
14
            audio_play_sound(snd_mirrorbreak2, 1, 0)
15
            audio_play_sound(snd_mart_impact_2, 1, 0)
16
            scr_screenshake_battle
scr_screenshake_battle

function 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, 2)
17
            for (var i = 0; i < 4; i++)
18
                instance_create_depth((x + 35), (y + 10), (depth + 1), obj_battle_enemy_attack_mecha_frog_glass)
19
            sprite_index = spr_bigfrog_cockpit_surprised
20
            alarm[0] = 30
alarm[0]

if live_call() return global.live_result; sprite_index = spr_bigfrog_cockpit_idle_cracked image_index = 0
21
            hit_noloop = true
22
            scene++
23
        }
24
        break
25
    case 1:
26
        if (hit_noloop == true)
27
            return;
28
        is_punched = false
29
        with (obj_battle_enemy_attack_mecha_frog_hand)
30
        {
31
            if (place_meeting(x, y, other) && state == "punch")
32
                is_punched = true
33
        }
34
        if (is_punched == true)
35
        {
36
            audio_play_sound(snd_mirrorbreak3, 1, 0)
37
            audio_play_sound(snd_mart_impact_2, 1, 0)
38
            scr_screenshake_battle
scr_screenshake_battle

function 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, 2)
39
            for (i = 0; i < 6; i++)
40
                instance_create_depth((x + 35), (y + 5), (depth + 1), obj_battle_enemy_attack_mecha_frog_glass)
41
            sprite_index = spr_bigfrog_cockpit_punched
42
            image_index = 0
43
            image_speed = 1
44
            scene++
45
        }
46
        break
47
    case 2:
48
        with (obj_battle_enemy_attack_mecha_frog_hand)
49
            active = false
50
        if (image_index >= (image_number - 1))
51
        {
52
            sprite_index = spr_bigfrog_cockpit_colletable
53
            scene++
54
        }
55
        break
56
    case 3:
57
        if place_meeting(x, y, obj_heart_battle_fighting_parent)
58
        {
59
            obj_macro_frog_counter.frog_scale = 1.5
60
            obj_macro_frog_counter.frog_count--
61
            audio_play_sound(snd_heal, 1, 0)
62
            sprite_index = spr_bigfrog_cockpit_nofrog
63
            scr_audio_fade_out
scr_audio_fade_out

function scr_audio_fade_out(argument0, argument1) //gml_Script_scr_audio_fade_out { var snd = argument0 var fade_len = argument1 if (!audio_is_playing(snd)) return false; audio_sound_gain(snd, 0, fade_len) if instance_exists(obj_audio_fade_helper) { with (obj_audio_fade_helper) { if (audio_to_fade == snd) return false; } } with (instance_create(0, 0, obj_audio_fade_helper)) audio_to_fade = snd }
(global.battle_music, 1000)
64
            scene++
65
        }
66
        break
67
    case 4:
68
        if cutscene_wait(1)
69
            audio_play_sound(mus_cymbal, 1, 0)
70
        break
71
    case 5:
72
        draw_alpha += 0.0064516129032258064
73
        if (draw_alpha >= 1)
74
            scene++
75
        break
76
    case 6:
77
        with (obj_battle_enemy_attack_mecha_frog_creator)
78
            instance_destroy()
79
        break
80
}