Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dummy_training_hat_Step_2

(view raw script w/o annotations or w/e)
1
if (state == 2)
2
{
3
    if (obj_dummy_training_dummy.damage_disjoint_count > 0 && global.hit_count >= 3)
4
        state = 3;
5
}
6
if (state == 1)
7
{
8
    if (state_1_no_loop == false)
9
    {
10
        time_elapsed += time_increase;
11
        if (time_elapsed >= time_max)
12
        {
13
            time_elapsed = time_max;
14
            alarm[0] = state_1_alarm;
gml_Object_obj_dummy_training_hat_Alarm_0.gml

state = 2; script_execute(scr_dummy_training_pacifist_no_attack);
15
            state_1_no_loop = true;
16
        }
17
        game_maker_cannot_do_math = power((time_elapsed / ((time_max / 2) * (1 / sqrt(max_rise)))) - sqrt(max_rise), 2);
18
        animation_disjoint_y = sign_modifier * (max_rise - round(game_maker_cannot_do_math));
19
        y = obj_dummy_training_dummy.y + on_y + animation_disjoint_y;
20
    }
21
}
22
else if (state == 2)
23
{
24
    x = obj_dummy_training_dummy.x + on_x;
25
    y = obj_dummy_training_dummy.y + on_y;
26
}
27
else if (state == 3)
28
{
29
    x += (spin_x_dir * spin_x_speed);
30
    image_angle += (spin_angle_dir * spin_angle_speed);
31
}