Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_trihecta_circle_bounce_Step_0

(view raw script w/o annotations or w/e)
1
x += x_speed
2
if (x_speed > 0)
3
{
4
    if (bbox_left > obj_dialogue_box_battle_transformation_any.bbox_right)
5
    {
6
        instance_destroy()
7
        return;
8
    }
9
}
10
else if (bbox_right < obj_dialogue_box_battle_transformation_any.bbox_left)
11
{
12
    instance_destroy()
13
    return;
14
}
15
if (image_index != 0)
16
    bounce_sound_can_check = true
17
else if (bounce_sound_can_check == true)
18
{
19
    bounce_sound_execute = true
20
    bounce_sound_can_check = false
21
}
22
if (bounce_sound_execute == true)
23
{
24
    var random_pitch = irandom_range(-1, 1)
25
    audio_play_sound(snd_trihecta_small_ball_bounce, 20, 0)
26
    audio_sound_pitch(snd_trihecta_small_ball_bounce, (1 + random_pitch * 0.3))
27
    bounce_sound_execute = false
28
}