Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_sousborg_flip_generator_Step_0

(view raw script w/o annotations or w/e)
1
if (layer_sequence_is_finished(attack_sequence) && can_move == false)
2
{
3
    can_move = true
4
    x_new = irandom_range(350, 450)
5
}
6
if (can_move == true)
7
{
8
    if (abs(layer_sequence_get_x(attack_sequence) - x_new) > 0.5)
9
        layer_sequence_x(attack_sequence, lerp(layer_sequence_get_x(attack_sequence), x_new, 0.4))
10
    else
11
    {
12
        can_move = false
13
        layer_sequence_play(attack_sequence)
14
    }
15
}