Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_o_coaster_hero_Draw_0

(view raw script w/o annotations or w/e)
1
var a = 2;
2
if (sprite_index == spr_susieb_actready)
3
    a = 1.5;
4
if (sprite_index == spr_susieb_act)
5
    a = 1.5;
6
if (sprite_index == spr_susieb_attackready)
7
    a = 1.5;
8
if (sprite_index == spr_susieb_attack)
9
    a = 1.5;
10
if (sprite_index == spr_susieb_defend)
11
    a = 1.5;
12
if (sprite_index == spr_susie_rudebuster)
13
    a = 1.5;
14
if (sprite_index == spr_susie_spell)
15
    a = 1.5;
16
if (sprite_index == spr_susieb_spell)
17
    a = 1.5;
18
if (sprite_index == spr_susie_spellready)
19
    a = 1.5;
20
if (sprite_index == spr_susie_actready)
21
    a = 1.5;
22
if (sprite_index == spr_susie_act)
23
    a = 1.5;
24
if (sprite_index == spr_susie_attackready)
25
    a = 1.5;
26
if (sprite_index == spr_susie_attack)
27
    a = 1.5;
28
if (sprite_index == spr_susie_defend)
29
    a = 1.5;
30
var hurt = 0;
31
if (sprite_index == spr_krisb_hurt)
32
    hurt = 1;
33
if (sprite_index == spr_susie_hurt)
34
    hurt = 1;
35
if (sprite_index == spr_susieb_hurt)
36
    hurt = 1;
37
if (sprite_index == spr_ralsei_hurt_fixed)
38
    hurt = 1;
39
if (HeroID == 0 && obj_herokris.hurt > 0)
40
    hurt = 1;
41
if (HeroID == 1 && instance_exists(obj_herosusie) && obj_herosusie.hurt > 0)
42
    hurt = 1;
43
if (HeroID == 2 && instance_exists(obj_heroralsei) && obj_heroralsei.hurt > 0)
44
    hurt = 1;
45
back.x = x;
46
back.y = y + 8;
47
var xx2 = 0;
48
var yy2 = 0;
49
if (sprite_index == spr_susie_act)
50
{
51
    xx2 = -5;
52
    yy2 = 5;
53
}
54
if (sprite_index == spr_susieb_act)
55
{
56
    xx2 = -9;
57
    yy2 = 7;
58
}
59
if (image_index < 0)
60
    image_index = 0;
61
if (userealsprite == 0)
62
    draw_sprite_ext(sprite_index, image_index, x + 20 + xx + xx2, (y - (sprite_get_height(sprite_index) * a)) + yy + yy2 + 8, image_xscale, image_yscale, 0, c_white, image_alpha);
63
if (instance_exists(obj_herosusie))
64
{
65
    if (obj_herosusie.sprite_index == spr_susier_dark)
66
        obj_herosusie.sprite_index = spr_susie_walk_right_dw;
67
    if (obj_herosusie.sprite_index == spr_susie_walk_right_dw)
68
    {
69
        obj_herosusie.x += 9;
70
        obj_herosusie.y += 0;
71
    }
72
}
73
if (instance_exists(obj_heroralsei))
74
{
75
    if (obj_heroralsei.sprite_index == spr_ralsei_walk_right)
76
    {
77
        obj_heroralsei.x += 7;
78
        obj_heroralsei.y += 3;
79
    }
80
}
81
if (hurt == 0)
82
    draw_sprite_ext(spr_coaster_hero, HeroID, x, y + 8, image_xscale, image_yscale, 0, c_white, image_alpha);
83
if (hurt == 1)
84
    draw_sprite_ext(spr_coaster_hero_hurt, HeroID, x, y + 8, image_xscale, image_yscale, 0, c_white, image_alpha);
85
if (hspeed < 0 || disabled == 1)
86
{
87
    if (userealsprite == 0)
88
        draw_sprite_ext(sprite_index, image_index, x + 20 + xx, (y - (sprite_get_height(sprite_index) * a)) + yy + 8, image_xscale, image_yscale, 0, c_black, 0.4);
89
    if (hurt == 0)
90
        draw_sprite_ext(spr_coaster_hero, HeroID, x, y + 8, image_xscale, image_yscale, 0, c_black, 0.4);
91
    if (hurt == 1)
92
        draw_sprite_ext(spr_coaster_hero_hurt, HeroID, x, y + 8, image_xscale, image_yscale, 0, c_black, 0.4);
93
}