Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_teevie_party_people_Create_0

(view raw script w/o annotations or w/e)
1
is_partying = false;
2
siner = 0;
3
image_xscale = 2;
4
image_yscale = 2;
5
image_speed = 0.2;
6
_is_init = false;
7
_party_sprite = -4;
8
_party_anim_speed = 0;
9
y_pos = ystart;
10
x_pos = xstart;
11
12
set_depth = function(arg0)
13
{
14
    depth = arg0;
15
};
16
17
init = function()
18
{
19
    if (_is_init)
20
        exit;
21
    _is_init = true;
22
    event_user(0);
23
};
24
25
start_partying = function()
26
{
27
    is_partying = true;
28
    if (_party_sprite != -4)
29
    {
30
        sprite_index = _party_sprite;
31
        image_speed = 0.2;
32
        if (image_xscale < 0)
33
            
scr_flip
scr_flip

function
scr_flip(arg0)
{ if (arg0 == "h" || arg0 == "x") { x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale); image_xscale = -image_xscale; } else { y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale); image_yscale = -image_yscale; } }
("x");
34
    }
35
};
36
37
stop_partying = function()
38
{
39
    is_partying = false;
40
    _party_sprite = sprite_index;
41
    _party_anim_speed = image_speed;
42
    image_speed = 0;
43
};
44
45
shock = function()
46
{
47
    stop_partying();
48
    event_user(1);
49
    
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
50
};