Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_cyber_shadowMaker_fireworks_Create_0

(view raw script w/o annotations or w/e)
1
timer = 0;
2
spawned = 1;
3
shadLength = 1;
4
floorshadOpacity = 0;
5
frontshadOpacity = 0;
6
floorShadowColor = c_black;
7
frontShadowColor = c_black;
8
fade_in = false;
9
fade_out = false;
10
fade_timer = 0;
11
fade_cleanup = false;
12
fade_reset = false;
13
is_active = false;
14
if (room == room_dw_cyber_maze_fireworks)
15
    is_active = global.flag[357 recruit_hacker] == 1;
16
inactive_cleanup = false;
17
cleanup_timer = 0;
18
depth = (room == room_dw_cyber_post_music_boss_slide) ? 80000 : 900000;
19
var shadow_amount = 1;
20
if (i_ex(obj_caterpillarchara))
21
{
22
    with (obj_caterpillarchara)
23
    {
24
        shadow_amount++;
25
        
scr_caterpillar_interpolate
scr_caterpillar_interpolate

function
scr_caterpillar_interpolate()
{ _newfacing =
scr_facing_letter_to_number(
scr_get_cardinal_direction(point_direction(x, y, obj_mainchara.x, obj_mainchara.y)));
remx[0] = obj_mainchara.x; remy[0] = obj_mainchara.y; facing[0] = _newfacing; for (_iaia = target; _iaia > 0; _iaia -= 1) { remx[_iaia] = lerp(obj_mainchara.x, x, _iaia / target); if (global.darkzone == 1) remy[_iaia] = lerp(obj_mainchara.y, y + 16, _iaia / target); else remy[_iaia] = lerp(obj_mainchara.y, y + 6, _iaia / target); facing[_iaia] = _newfacing; } }
();
26
    }
27
}
28
if (i_ex(obj_interactablesolid))
29
{
30
    with (obj_interactablesolid)
31
        shadow_amount++;
32
}
33
for (var i = 0; i < shadow_amount; i++)
34
{
35
    shadow_char[i] = instance_create(x, y, obj_marker);
36
    shadow_char[i].image_speed = 0;
37
}
38
shadow_total = shadow_amount;
39
if (i_ex(obj_interactablesolid))
40
{
41
    var hacker_sprite, hacker_x, hacker_y, hacker_index;
42
    with (obj_interactablesolid)
43
    {
44
        hacker_x = x;
45
        hacker_y = y;
46
        var hacker_depth = depth;
47
        hacker_sprite = sprite_index;
48
        hacker_index = image_index;
49
    }
50
    shadow_char[shadow_total - 1].sprite_index = hacker_sprite;
51
    shadow_char[shadow_total - 1].image_speed = 0;
52
    shadow_char[shadow_total - 1].image_xscale = 2;
53
    shadow_char[shadow_total - 1].image_yscale = 2;
54
    shadow_char[shadow_total - 1].x = hacker_x;
55
    shadow_char[shadow_total - 1].y = hacker_y + 4;
56
    shadow_char[shadow_total - 1].image_blend = frontShadowColor;
57
    shadow_char[shadow_total - 1].image_alpha = frontshadOpacity;
58
    shadow_char[shadow_total - 1].image_index = hacker_index;
59
}