Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_o_coaster_hero_Other_25

(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_susie_spellready)
17
    a = 1.5;
18
if (sprite_index == spr_susie_actready)
19
    a = 1.5;
20
if (sprite_index == spr_susie_act)
21
    a = 1.5;
22
if (sprite_index == spr_susie_attackready)
23
    a = 1.5;
24
if (sprite_index == spr_susie_attack)
25
    a = 1.5;
26
if (sprite_index == spr_susie_defend)
27
    a = 1.5;
28
var hurt = 0;
29
if (sprite_index == spr_krisb_hurt)
30
    hurt = 1;
31
if (sprite_index == spr_susie_hurt)
32
    hurt = 1;
33
if (sprite_index == spr_susieb_hurt)
34
    hurt = 1;
35
if (sprite_index == spr_ralsei_hurt_fixed)
36
    hurt = 1;
37
if (HeroID == 0 && obj_herokris.hurt > 0)
38
    hurt = 1;
39
if (HeroID == 1 && instance_exists(obj_herosusie) && obj_herosusie.hurt > 0)
40
    hurt = 1;
41
if (HeroID == 2 && instance_exists(obj_heroralsei) && obj_heroralsei.hurt > 0)
42
    hurt = 1;
43
back.x = x;
44
back.y = y + 8;
45
var xx2 = 0;
46
var yy2 = 0;
47
if (sprite_index == spr_susie_act)
48
{
49
    xx2 = -5;
50
    yy2 = 5;
51
}
52
if (sprite_index == spr_susieb_act)
53
{
54
    xx2 = -9;
55
    yy2 = 7;
56
}
57
if (userealsprite == 0)
58
    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);
59
if (instance_exists(obj_herosusie))
60
{
61
    if (obj_herosusie.sprite_index == spr_susier_dark)
62
        obj_herosusie.sprite_index = spr_susie_walk_right_dw;
63
    if (obj_herosusie.sprite_index == spr_susie_walk_right_dw)
64
    {
65
        obj_herosusie.x += 9;
66
        obj_herosusie.y += 0;
67
    }
68
}
69
if (instance_exists(obj_heroralsei))
70
{
71
    if (obj_heroralsei.sprite_index == spr_ralsei_walk_right)
72
    {
73
        obj_heroralsei.x += 7;
74
        obj_heroralsei.y += 3;
75
    }
76
}
77
if (hurt == 0)
78
    draw_sprite_ext(spr_coaster_hero, HeroID, x, y + 8, image_xscale, image_yscale, 0, c_white, image_alpha);
79
if (hurt == 1)
80
    draw_sprite_ext(spr_coaster_hero_hurt, HeroID, x, y + 8, image_xscale, image_yscale, 0, c_white, image_alpha);
81
if (hspeed < 0 || disabled == 1)
82
{
83
    if (userealsprite == 0)
84
        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);
85
    if (hurt == 0)
86
        draw_sprite_ext(spr_coaster_hero, HeroID, x, y + 8, image_xscale, image_yscale, 0, c_black, 0.4);
87
    if (hurt == 1)
88
        draw_sprite_ext(spr_coaster_hero_hurt, HeroID, x, y + 8, image_xscale, image_yscale, 0, c_black, 0.4);
89
}