Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_b3bs_zapper_a_Create_0

(view raw script w/o annotations or w/e)
1
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
2
    
scr_setparty
scr_setparty

function
scr_setparty(arg0, arg1, arg2)
{ var kris = obj_mainchara; var slot = 0; var __make = true; if (!i_ex(kris)) __make = false;
scr_losechar();
safe_delete(obj_caterpillarchara); if (arg0 == true) {
scr_getchar(2);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 2, slot))
{ halign = (global.darkzone == 0) ? 3 : 6; valign = (global.darkzone == 0) ? 6 : 16; x -= halign; y -= valign; } } slot++; } if (arg1 == true) {
scr_getchar(3);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 3, slot))
{ halign = 2; valign = 12; x -= halign; y -= valign; } } slot++; } if (arg2 == true) {
scr_getchar(4);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 4, slot))
{ halign = (global.darkzone == 0) ? 2 : 4; valign = (global.darkzone == 0) ? 9 : 18; x -= halign; y -= valign; } } slot++; } }
(1, 1, 0);
3
var range = 180;
4
for (var i = 0; i < 3; i++)
5
{
6
    with (instance_create(426 + (range * i), 272.5, obj_dw__backstagelight))
7
    {
8
        type = 1;
9
        movetype = 0;
10
        wally = 240;
11
        detecttype = 1;
12
        movespeed = 100;
13
        rate = 32;
14
    }
15
}
16
with (instance_create(426 + (range * 3), 316, obj_dw__backstagelight))
17
{
18
    type = 1;
19
    movetype = 1;
20
    wally = 240;
21
    movespeed = 100;
22
    rate = 32;
23
}
24
con = 0;
25
timer = 0;
26
if (global.flag[1103 ice_key_fail] == 0)
27
{
28
    with (instance_create(1480, 120, obj_solidblocksized))
29
    {
30
        sprite_index = spr_pxwhite;
31
        visible = true;
32
        image_blend = c_black;
33
        image_xscale = 320;
34
        image_yscale = 240;
35
        depth = 1000049;
36
    }
37
    with (instance_create(1440, 320, obj_solidblocksized))
38
    {
39
        sprite_index = spr_pxwhite;
40
        visible = true;
41
        image_blend = c_black;
42
        image_xscale = 40;
43
        image_yscale = 40;
44
        depth = 1000049;
45
    }
46
}
47
ccon = 0;
48
ctimer = 0;
49
if (global.flag[1135 unlocked_stealth] == 1)
50
    ccon = 100;
51
camx = 0;
52
var makestealth = true;
53
if (global.flag[1137 found_trash_switch] > 0)
54
{
55
    with (obj_dw__backstagelight)
56
        instance_destroy();
57
}
58
if (makestealth)
59
{
60
    with (
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(344, 142,
scr_84_get_sprite
scr_84_get_sprite

function
scr_84_get_sprite(arg0)
{ return ds_map_find_value(global.chemg_sprite_map, arg0); }
("spr_dw_ch3_b3bs_stealthzone")))
61
    {
62
        depth = 1000050;
63
        image_blend = #65381B;
64
    }
65
    
scr_stealth_drawmarkers
scr_stealth_drawmarkers

function
scr_stealth_drawmarkers()
{ var footcolor = #412311; var arrowcolor = #884823; var thedepth = 1000050; var aryoff = 0; if (room == room_dw_teevie_stealth_d) { footcolor = #A20B0D; arrowcolor = #FF946F; aryoff = -6; thedepth = 999999; } with (obj_b3bs_stealtharea) { mark[0] =
scr_dark_marker(x - 4, ((10 + y) - 40) + aryoff, spr_dw_ch3_b3bs_stealth_downarrow);
mark[1] =
scr_marker_ext(x + 4 + sprite_width + 4, ((10 + y) - 40) + aryoff, spr_dw_ch3_b3bs_stealth_downarrow, -2, 2);
for (var i = 0; i < ((sprite_width - 36) / 8); i++) { var xpos = 18 + (i * 8); mark[i + 2] =
scr_dark_marker(x + xpos, (y - 40) + 12 + aryoff, spr_pxwhite);
mark[i + 2].image_xscale = 8; mark[i + 2].image_yscale = 4; if ((xpos % 3) == 0) mark[i + 2].y -= 2; } for (var i = 0; i < array_length(mark); i++) { mark[i].depth = thedepth; mark[i].image_blend = arrowcolor; } for (var i = 0; i < (image_xscale / 40); i++) { var xpos = x + (i * 40); if ((i % 3) == 0) xpos += 4; var ypos = y + 4; if ((i % 2) == 0) ypos += 6; with (
scr_dark_marker(xpos, ypos, spr_dw_ch3_b3bs_stealth_footprint))
{ depth = thedepth; image_blend = footcolor; } } } }
();
66
}
67
paannounce = 0;
68
pa = 0;
69
if (global.flag[1136 TODO] == 1)
70
    paannounce = 99;
71
patime = 0;
72
if (global.flag[1184 sneaking_fast] == 0)
73
    fastcon = 1;
74
else
75
    fastcon = -1;
76
closeddoor = instance_create(194, 108, obj_solidblock);
77
with (closeddoor)
78
{
79
    sprite_index = spr_dw_ch3_b3bs_closeddoor;
80
    
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
81
    visible = true;
82
    depth = 1000049;
83
}
84
doortrig = 0;
85
doortrig = instance_create(194, 205, obj_trigger_interact);
86
with (doortrig)
87
    
scr_size
scr_size

function
scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{ with (arg2) { image_xscale = arg0; image_yscale = arg1; } }
(6.25, 1.875);
88
if (global.flag[1137 found_trash_switch] == 1)
89
{
90
    safe_delete(closeddoor);
91
    safe_delete(doortrig);
92
}
93
doorcon = 0;