Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_ceroba_transformation_soul_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
charge_percentage = charge_time / charge_time_max
4
if is_charging
5
{
6
    if ((!audio_is_playing(snd_chargeshot_charge)) && (!is_charged))
7
    {
8
        charge_sound = audio_play_sound(snd_chargeshot_charge, 1, 1)
9
        audio_sound_gain(charge_sound, 0.8, 0)
10
        audio_sound_pitch(charge_sound, 0.5)
11
    }
12
    if (charge_time > 0)
13
        charge_time -= 1
14
    else if (!is_charged)
15
    {
16
        var ready_sound = audio_play_sound(snd_undertale_flash, 1, 0)
17
        audio_sound_gain(ready_sound, 0.5, 0)
18
        is_charged = true
19
        sprite_index = spr_heart_yellow_ready
20
        image_index = 0
21
        image_speed = 1
22
    }
23
}
24
else
25
    audio_stop_sound(charge_sound)
26
if ((can_shoot && keyboard_multicheck_pressed(0)) || auto_shoot)
27
{
28
    alarm[0] = -1
alarm[0]

draw_hint = true
29
    draw_hint = false
30
    can_shoot = false
31
    auto_shoot = false
32
    if (is_charging == true)
33
    {
34
        is_charging = false
35
        charge_time = charge_time_max
36
        sprite_index = spr_heart_yellow_up
37
        image_index = 0
38
        image_speed = 0
39
        if (is_charged == true)
40
        {
41
            instance_create_depth((x + 0.5), (y - 6), -10000, obj_heart_yellow_shot_big)
42
            is_charged = false
43
            sprite_index = spr_heart_yellow_shoot
44
            image_index = 0
45
            image_speed = 1
46
        }
47
    }
48
}
49
if audio_is_playing(charge_sound)
50
{
51
    var pitch_original = audio_sound_get_pitch(charge_sound)
52
    if (pitch_original < 0.99)
53
        audio_sound_pitch(charge_sound, (1 - 0.5 * charge_percentage))
54
    else
55
        audio_sound_pitch(charge_sound, 1)
56
}
57
if (!draw_hint)
58
{
59
    if (can_shoot && (!alarm[0]))
60
        alarm[0] = 60
alarm[0]

draw_hint = true
61
}
62
else if (hint_alpha < 1)
63
    hint_alpha += 0.1