Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_titan_climb_overlay_Draw_0

(view raw script w/o annotations or w/e)
1
siner++;
2
gpu_set_blendenable(false);
3
gpu_set_colorwriteenable(false, false, false, true);
4
draw_set_alpha(overlay_alpha);
5
ossafe_fill_rectangle(0, 0, room_width + 20, room_height + 20, false);
6
draw_set_alpha(1);
7
if (target != -4)
8
{
9
    draw_set_alpha(0);
10
    base_x_pos = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(base_x_pos, target.x + x_pos_offset, 10);
11
    d_circle(base_x_pos, target.y + 20, radius + sin(siner / 12), false);
12
    draw_set_alpha(1);
13
}
14
gpu_set_blendenable(true);
15
gpu_set_colorwriteenable(true, true, true, true);
16
gpu_set_blendmode_ext(bm_dest_alpha, bm_inv_dest_alpha);
17
draw_set_alpha(0);
18
draw_set_color(c_black);
19
ossafe_fill_rectangle(-10, -10, room_width + 10, room_height + 10);
20
draw_set_color(c_white);
21
draw_set_alpha(1);
22
gpu_set_blendmode(bm_normal);