Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_screenshake_hurt_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var camera = view_camera[0]
4
camera_set_view_pos(camera, 0, 0)
5
if can_screenshake
6
{
7
    battle_screenshake_duration -= 1
8
    if (battle_screenshake_duration <= 0)
9
    {
10
        instance_destroy()
11
        return;
12
    }
13
    camera_set_view_pos(camera, (view_x + (choose(battle_screenshake_intensity, (-battle_screenshake_intensity)))), (view_y + (choose(battle_screenshake_intensity, (-battle_screenshake_intensity)))))
14
    battle_screenshake_intensity -= battle_screenshake_dec
15
    can_screenshake = false
16
}
17
else
18
    can_screenshake = true