Deltarune 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; __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_count >= 3) __emotexoff = argument[2]; 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
    __anchorx = sprite_get_xoffset(sprite_index);
10
    if (argument[0] == "!")
11
    {
12
        __emotebubble.sprite_index = spr_exc;
13
        __emotebubble.y = y - (10 * __dmult);
14
        __emotexoff = 10 * __dmult;
15
    }
16
    if (argument[0] == "?")
17
    {
18
        __emotebubble.sprite_index = spr_emote_questionmark;
19
        __emotebubble.y = y - (10 * __dmult);
20
        __emotexoff = 10 * __dmult;
21
    }
22
    if (argument[0] == "...")
23
    {
24
        __emotebubble.sprite_index = spr_emote_ellipsis;
25
        __emotebubble.y = y - (10 * __dmult);
26
        __emotexoff = 10 * __dmult;
27
    }
28
    if (argument_count >= 3)
29
        __emotexoff = argument[2];
30
    if (image_xscale > 0)
31
        __emotebubble.x = (((x - (__anchorx * image_xscale)) + ((sprite_width / 2) * sign(image_xscale))) - (__emotebubble.sprite_width / 2)) + __emotexoff;
32
    else
33
        __emotebubble.x = ((x + (__anchorx * image_xscale)) - ((sprite_width / 2) * sign(image_xscale)) - (__emotebubble.sprite_width / 2)) + __emotexoff;
34
}