Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_rotating_fg_controller_Draw_0

(view raw script w/o annotations or w/e)
1
if (obj_mainchara.y >= 220 && obj_mainchara.y < 1500 && obj_rotating_tower_controller.yoffset <= 820 && (obj_rotating_tower_controller.tower_angle < 18 || obj_rotating_tower_controller.tower_angle > 340))
2
{
3
    if (right_h())
4
        tunnel_offset_x -= 2.5;
5
}
6
if (left_h())
7
    tunnel_offset_x += 2.5;
8
if (up_h())
9
    tunnel_offset_y += 2;
10
if (down_h())
11
    tunnel_offset_y -= 2;
12
if (!surface_exists(surf_tunnel))
13
    surf_tunnel = surface_create(320, 680);
14
surface_set_target(surf_tunnel);
15
draw_sprite_tiled_ext(spr_rotating_tower_fg_stone2, 0, tunnel_offset_x, tunnel_offset_y - 60, 1, 1.6, merge_color(c_white, c_gray, 0.5), 1);
16
draw_set_blend_mode(bm_subtract);
17
draw_sprite_ext(spr_whitepixel, image_index, 220, 0, 200, 700, 0, image_blend, 1);
18
draw_sprite_ext(spr_whitepixel, image_index, 106, 0, -200, 700, 0, image_blend, 1);
19
draw_set_blend_mode(bm_normal);
20
surface_reset_target();
21
shader_set(shd_tunnel_inverse7);
22
shader_set_uniform_f(uni_distort_amount, 20);
23
draw_surface(surf_tunnel, 162, cameray() + 30);
24
shader_reset();
25
var offset = 20;
26
var scale = 0.5;