Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_act_charsprite_scale

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

function
scr_act_charsprite_scale(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } __returnvalue = _charactsprite[_charnum]; if (i_ex(_charinstance)) { with (_charinstance) { image_alpha = 0; state = 0; global.faceaction[myself] = 0; } _charactsprite[_charnum] =
scr_dark_marker(_charinstance.x, _charinstance.y, arg1);
with (_charactsprite[_charnum]) { image_xscale = 1; image_yscale = 1; depth = 20 - (__view_get(e__VW.YView, 0) / 40);
scr_oflash();
if (arg2 > 0 && arg3 == 0)
scr_animate(0, 0, arg2);
if (arg2 > 0 && arg3 == 1) image_speed = arg2; a =
scr_afterimage();
a.hspeed = 2.5; a.depth = depth + 1; b =
scr_afterimage();
b.image_alpha = 0.6; b.hspeed = 5; b.depth = depth + 2; } __returnvalue = _charactsprite[_charnum]; } return __returnvalue; } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
(arg0, arg1, arg2, arg3)
2
{
3
    _charactor = arg0;
4
    _charinstance = obj_herokris;
5
    if (_charactor == "noelle")
6
    {
7
        _charinstance = obj_heronoelle;
8
        _charnum = 4;
9
    }
10
    if (_charactor == "ralsei")
11
    {
12
        _charinstance = obj_heroralsei;
13
        _charnum = 3;
14
    }
15
    if (_charactor == "susie")
16
    {
17
        _charinstance = obj_herosusie;
18
        _charnum = 2;
19
    }
20
    if (_charactor == "kris")
21
    {
22
        _charinstance = obj_herokris;
23
        _charnum = 1;
24
    }
25
    __returnvalue = _charactsprite[_charnum];
26
    if (i_ex(_charinstance))
27
    {
28
        with (_charinstance)
29
        {
30
            image_alpha = 0;
31
            state = 0;
32
            global.faceaction[myself] = 0;
33
        }
34
        _charactsprite[_charnum] = 
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; }
(_charinstance.x, _charinstance.y, arg1);
35
        with (_charactsprite[_charnum])
36
        {
37
            image_xscale = 1;
38
            image_yscale = 1;
39
            depth = 20 - (__view_get(e__VW.YView, 0) / 40);
40
            
scr_oflash
scr_oflash

function
scr_oflash()
{ _oflash = instance_create(x, y, obj_oflash); _oflash.image_xscale = image_xscale; _oflash.image_speed = 0; _oflash.image_angle = image_angle; _oflash.image_index = image_index; _oflash.image_yscale = image_yscale; _oflash.sprite_index = sprite_index; _oflash.depth = depth - 1; _oflash.target = id; return _oflash; }
();
41
            if (arg2 > 0 && arg3 == 0)
42
                
scr_animate
scr_animate

function
scr_animate(arg0, arg1, arg2)
{ __animator = instance_create(x, y, obj_animator); __animator.target = id; __animator.initframe = arg0; __animator.endframe = arg1; __animator.fake_image_speed = arg2; return __animator; }
(0, 0, arg2);
43
            if (arg2 > 0 && arg3 == 1)
44
                image_speed = arg2;
45
            a = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
46
            a.hspeed = 2.5;
47
            a.depth = depth + 1;
48
            b = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
49
            b.image_alpha = 0.6;
50
            b.hspeed = 5;
51
            b.depth = depth + 2;
52
        }
53
        __returnvalue = _charactsprite[_charnum];
54
    }
55
    return __returnvalue;
56
}
57
58
enum e__VW
59
{
60
    XView,
61
    YView,
62
    WView,
63
    HView,
64
    Angle,
65
    HBorder,
66
    VBorder,
67
    HSpeed,
68
    VSpeed,
69
    Object,
70
    Visible,
71
    XPort,
72
    YPort,
73
    WPort,
74
    HPort,
75
    Camera,
76
    SurfaceID
77
}