Deltarune (Chapter 3) script viewer

← back to main script listing

gml_GlobalScript_scr_act_charsprite

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

function
scr_act_charsprite(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]) { 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; if (arg2 > 0 && arg3 == 2)
scr_animate(0, sprite_get_number(arg1) - 1, arg2);
if (arg2 > 0 && arg3 > 2) {
scr_animate(0, sprite_get_number(arg1) - 1, arg2);
__animator.delay = arg3; } 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
            depth = 20 - (__view_get(e__VW.YView, 0) / 40);
38
            
scr_oflash
scr_oflash

function
scr_oflash(arg0 = false)
{ var _oflash = instance_create_depth(x, y, depth - 1, obj_oflash); _oflash.image_xscale = image_xscale; _oflash.image_yscale = image_yscale; _oflash.image_speed = 0; _oflash.image_index = image_index; _oflash.sprite_index = sprite_index; _oflash.target = id; _oflash.follow = arg0; return _oflash; }
();
39
            if (arg2 > 0 && arg3 == 0)
40
                
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);
41
            if (arg2 > 0 && arg3 == 1)
42
                image_speed = arg2;
43
            if (arg2 > 0 && arg3 == 2)
44
                
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, sprite_get_number(arg1) - 1, arg2);
45
            if (arg2 > 0 && arg3 > 2)
46
            {
47
                
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, sprite_get_number(arg1) - 1, arg2);
48
                __animator.delay = arg3;
49
            }
50
            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; }
();
51
            a.hspeed = 2.5;
52
            a.depth = depth + 1;
53
            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; }
();
54
            b.image_alpha = 0.6;
55
            b.hspeed = 5;
56
            b.depth = depth + 2;
57
        }
58
        __returnvalue = _charactsprite[_charnum];
59
    }
60
    return __returnvalue;
61
}
62
63
enum e__VW
64
{
65
    XView,
66
    YView,
67
    WView,
68
    HView,
69
    Angle,
70
    HBorder,
71
    VBorder,
72
    HSpeed,
73
    VSpeed,
74
    Object,
75
    Visible,
76
    XPort,
77
    YPort,
78
    WPort,
79
    HPort,
80
    Camera,
81
    SurfaceID
82
}