Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_ceroba_defeated_hair_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (instance_exists(obj_ceroba_body_pacifist_phase_2))
4
{
5
    switch (obj_ceroba_body_pacifist_phase_2.sprite_index)
6
    {
7
        case -4:
8
            attach_points = [[-100, -1740]];
9
            break;
10
        case spr_ceroba_p2_get_up_1:
11
            attach_points = [[326, 230], [326, 230], [326, 230], [326, 230], [326, 230], [326, 230], [326, 230], [329, 225], [329, 229], [328, 229], [328, 229], [326, 235], [326, 234], [326, 233], [326, 231], [326, 231], [326, 231], [326, 231], [326, 231], [326, 231], [326, 231], [326, 231], [326, 231], [326, 231], [326, 231], [326, 239], [-400, -400]];
12
            break;
13
        case spr_ceroba_p2_get_up_2:
14
            attach_points = [[322, 230], [322, 235], [322, 239], [322, 238], [322, 230], [322, 226], [322, 224], [322, 224], [322, 224], [322, 223], [323, 200], [314, 189], [314, 187], [314, 187], [314, 190], [314, 192]];
15
            break;
16
        case spr_ceroba_p2_get_up_3:
17
            attach_points = [[314, 192], [314, 189], [314, 189], [314, 191], [314, 191], [314, 189], [314, 187], [314, 187], [314, 201], [-900, -900]];
18
            break;
19
        default:
20
            instance_destroy();
21
            exit;
22
            break;
23
    }
24
    scr_point_attach
scr_point_attach

function scr_point_attach() { if (live_call()) return global.live_result; var coords = argument[0]; var target_instance = argument[1]; if (!instance_exists(target_instance)) { show_debug_message("Target attach point instance does not exist!"); return false; } var x_offset = sprite_get_xoffset(target_instance.sprite_index); var y_offset = sprite_get_yoffset(target_instance.sprite_index); if (argument_count > 2 && argument[2] == true) { x_offset = 0; y_offset = 0; } var array_index = clamp(target_instance.image_index, 0, array_length(coords) - 1); x = (target_instance.x - x_offset) + coords[array_index][0]; y = (target_instance.y - y_offset) + coords[array_index][1]; }
(attach_points, 2833);
25
}