Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_attack_ace_cards_shape_Step_0

(view raw script w/o annotations or w/e)
1
switch (attack_state)
2
{
3
    case 1:
4
        speed = lerp(speed, 0, 0.25);
5
        if (abs(speed) <= 0.02)
6
        {
7
            instance_create_depth(x, y, depth, obj_battle_enemy_attack_ace_shockwave);
8
            speed = 0;
9
            attack_state += 1;
10
            alarm[1] = 2;
gml_Object_obj_attack_ace_cards_shape_Alarm_1.gml

var remnant = instance_create_depth(x, y, depth + 1, obj_attack_ace_cards_shape_remnant); remnant.sprite_index = sprite_index; alarm[1] = 2;
11
        }
12
        break;
13
    case 2:
14
        var heart = obj_heart_battle_fighting_red;
15
        var target_dir = point_direction(x, y, heart.x, heart.y);
16
        if (y < heart.y)
17
        {
18
            direction_inc = lerp(direction_inc, sign(target_dir - direction) * direction_inc_max, 0.2);
19
            direction += direction_inc;
20
        }
21
        speed = max_speed;
22
        break;
23
}