Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dunes_10_controller_Step_0

(view raw script w/o annotations or w/e)
1
if (irandom(random_odd) == 1 && (!instance_exists(obj_dunes_10_pebbles_fall)))
2
{
3
    rumble_sound = audio_play_sound(snd_rock_roll, 1, 0)
4
    var screenshake = instance_create(obj_pl.x, obj_pl.y, obj_screenshake_player)
5
    with (screenshake)
6
    {
7
       alarm[0]
8
        intensity = 1
9
    }
10
    fall = true
11
    random_odd = 800
12
}
13
else if (random_odd > 10)
14
    random_odd -= 2
15
else
16
    random_odd = 10
17
if (fall == true)
18
{
19
    var pebble_number = irandom_range(6, 12)
20
    var x_gap = 600 / pebble_number
21
    for (var i = 0; i < pebble_number; i++)
22
        instance_create((0 + x_gap * i + (irandom_range(-120, 60))), irandom_range(-60, 60), obj_dunes_10_pebbles_fall)
23
    fall = false
24
}
25
if audio_is_playing(rumble_sound)
26
{
27
    if (audio_sound_get_track_position(rumble_sound) > 1)
28
        audio_stop_sound(rumble_sound)
29
}