Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_ch5_LW07_thrashfit_sprite_Create_0

(view raw script w/o annotations or w/e)
1
_surface = -4;
2
_sprite = -4;
3
_sprite_hat = -4;
4
_hair_sprite = 4335;
5
_shirt_sprite = 2109;
6
_shoes_sprite = 6556;
7
_enabled = false;
8
_hat_enabled = true;
9
_print_mode = false;
10
_print_reverse = false;
11
_print_timer = 0;
12
_x_pos = 0;
13
_x_scale = 2;
14
_y_pos = 0;
15
_flash_mode = false;
16
_flash_alpha = 0;
17
18
init = function(arg0 = false, arg1 = true)
19
{
20
    if (arg0)
21
    {
22
        _hair_sprite = arg1 ? 3292 : 6064;
23
        _shirt_sprite = 2249;
24
        _shoes_sprite = 4071;
25
    }
26
    _enabled = true;
27
};
28
29
print = function()
30
{
31
    _print_mode = true;
32
};
33
34
reverse_print = function()
35
{
36
    _print_mode = true;
37
    _print_reverse = true;
38
};
39
40
flash_on = function()
41
{
42
    _flash_mode = true;
43
    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("_flash_alpha", 0, 1, 12);
44
};
45
46
flash_off = function()
47
{
48
    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("_flash_alpha", 1, 0, 12);
49
    scr_delay_var("_flash_mode", false, 13);
50
};
51
52
get_hat_sprite = function()
53
{
54
    return _sprite_hat;
55
};
56
57
disable_hat = function()
58
{
59
    _hat_enabled = false;
60
};
61
62
clean_up = function()
63
{
64
    if (surface_exists(_surface))
65
        surface_free(_surface);
66
    if (sprite_exists(_sprite))
67
        sprite_delete(_sprite);
68
};