Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_clover_defragment

(view raw script w/o annotations or w/e)
1
function scr_clover_defragment
scr_clover_defragment

function scr_clover_defragment() //gml_Script_scr_clover_defragment { if live_call() return global.live_result; var width = sprite_get_width(sprite_index) var height = sprite_get_height(sprite_index) i_inc = width / 20 j_inc = 2 var x_left = x - sprite_xoffset var y_top = y + sprite_yoffset - sprite_height for (var j = spr_collisionbox; j < height; j += j_inc) { part = instance_create(x_left, (y_top + j), obj_piece_clover) with (part) { target_x = other.x target_y = other.y left = 0 top = j width = width height = other.j_inc sprite_index = other.sprite_index alarm[0] if (j == spr_collisionbox) event_perform(ev_alarm, 0) } } }
() //gml_Script_scr_clover_defragment
2
{
3
    if live_call()
4
        return global.live_result;
5
    var width = sprite_get_width(sprite_index)
6
    var height = sprite_get_height(sprite_index)
7
    i_inc = width / 20
8
    j_inc = 2
9
    var x_left = x - sprite_xoffset
10
    var y_top = y + sprite_yoffset - sprite_height
11
    for (var j = spr_collisionbox; j < height; j += j_inc)
12
    {
13
        part = instance_create(x_left, (y_top + j), obj_piece_clover)
14
        with (part)
15
        {
16
            target_x = other.x
17
            target_y = other.y
18
            left = 0
19
            top = j
20
            width = width
21
            height = other.j_inc
22
            sprite_index = other.sprite_index
23
           alarm[0]
24
            if (j == spr_collisionbox)
25
                event_perform(ev_alarm, 0)
26
        }
27
    }
28
}