Deltarune (Chapter 3) script viewer

← back to main script listing

gml_GlobalScript_scr_emote

(view raw script w/o annotations or w/e)
1
function 
scr_emote
scr_emote

function
scr_emote()
{ __dmult = 1 + global.darkzone; __emotebubble = instance_create(x, y - 15, obj_excblcon); __emotebubble.alarm[0] = argument[1]; __emotebubble.image_xscale = __dmult; __emotebubble.image_yscale = __dmult; __emotexoff = 0; __emoteyoff = 0; __anchorx = sprite_get_xoffset(sprite_index); if (argument[0] == "!") { __emotebubble.sprite_index = spr_exc; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument[0] == "?") { __emotebubble.sprite_index = spr_emote_questionmark; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument[0] == "...") { __emotebubble.sprite_index = spr_emote_ellipsis; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument[0] == "note") { __emotebubble.sprite_index = spr_musblc; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument_count >= 3) __emotexoff = argument[2]; if (argument_count >= 4) __emoteyoff = argument[3]; __emotebubble.y += __emoteyoff; if (image_xscale > 0) __emotebubble.x = (((x - (__anchorx * image_xscale)) + ((sprite_width / 2) * sign(image_xscale))) - (__emotebubble.sprite_width / 2)) + __emotexoff; else __emotebubble.x = ((x + (__anchorx * image_xscale)) - ((sprite_width / 2) * sign(image_xscale)) - (__emotebubble.sprite_width / 2)) + __emotexoff; }
()
2
{
3
    __dmult = 1 + global.darkzone;
4
    __emotebubble = instance_create(x, y - 15, obj_excblcon);
5
    __emotebubble.alarm[0] = argument[1];
6
    __emotebubble.image_xscale = __dmult;
7
    __emotebubble.image_yscale = __dmult;
8
    __emotexoff = 0;
9
    __emoteyoff = 0;
10
    __anchorx = sprite_get_xoffset(sprite_index);
11
    if (argument[0] == "!")
12
    {
13
        __emotebubble.sprite_index = spr_exc;
14
        __emotebubble.y = y - (10 * __dmult);
15
        __emotexoff = 10 * __dmult;
16
    }
17
    if (argument[0] == "?")
18
    {
19
        __emotebubble.sprite_index = spr_emote_questionmark;
20
        __emotebubble.y = y - (10 * __dmult);
21
        __emotexoff = 10 * __dmult;
22
    }
23
    if (argument[0] == "...")
24
    {
25
        __emotebubble.sprite_index = spr_emote_ellipsis;
26
        __emotebubble.y = y - (10 * __dmult);
27
        __emotexoff = 10 * __dmult;
28
    }
29
    if (argument[0] == "note")
30
    {
31
        __emotebubble.sprite_index = spr_musblc;
32
        __emotebubble.y = y - (10 * __dmult);
33
        __emotexoff = 10 * __dmult;
34
    }
35
    if (argument_count >= 3)
36
        __emotexoff = argument[2];
37
    if (argument_count >= 4)
38
        __emoteyoff = argument[3];
39
    __emotebubble.y += __emoteyoff;
40
    if (image_xscale > 0)
41
        __emotebubble.x = (((x - (__anchorx * image_xscale)) + ((sprite_width / 2) * sign(image_xscale))) - (__emotebubble.sprite_width / 2)) + __emotexoff;
42
    else
43
        __emotebubble.x = ((x + (__anchorx * image_xscale)) - ((sprite_width / 2) * sign(image_xscale)) - (__emotebubble.sprite_width / 2)) + __emotexoff;
44
}