Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_blue_enemy_Create_0

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

function
scr_enemy_object_init()
{ becomeflash = 0; flash = 0; turnt = 0; turns = 0; talktimer = 0; state = 0; siner = 0; fsiner = 0; talked = 0; attacked = 0; hurt = 0; hurttimer = 0; hurtshake = 0; shakex = 0; mywriter = 343249823; acttimer = 0; con = 0; dodgetimer = 0; fatal = 0; candodge = 0; mytarget = 0; ambushed = 0; firststrike = 0; damage = -1; grazepoints = -1; timepoints = -1; inv = -1; target = -1; grazed = -1; grazetimer = -1; element = "none"; acting = 0; actcon = 0; actingsus = 0; actingnoe = 0; actingral = 0; actconsus = 0; actconral = 0; actconnoe = 0; simulorderkri = -1; simulordersus = -1; simulorderral = -1; simulordernoe = -1; simultotal = 0; simulboss = -1; talkmax = 90; mercymod = 0; maxmercy = 100; recruitable = 1; freezable = 1; recruitcount = 1; sactionboxx = 0; sactionboxy = 0; hurtspriteoffx = 0; hurtspriteoffy = 0; image_xscale = 2; image_yscale = 2; image_speed = 0.2; idlesprite = spr_diamond_knight_overworld; hurtsprite = spr_diamond_knight_hurt; sparedsprite = spr_diamond_knight_spared; custombody = 0; setbattlemsg = false; for (i = 0; i < 10; i++) _charactsprite[i] = 382938298329; depth = 90 - ((y - cameray()) / 50); }
();
2
grazepoints = 200;
3
recruitcount = 5;
4
talkmax = 120;
5
image_speed = 0.16666666666666666;
6
idlesprite = spr_enemy_blue_ballet;
7
hurtsprite = spr_enemy_blue_ballet;
8
sparedsprite = spr_enemy_blue_ballet;
9
custom_draw_example = 0;
10
myattackchoice = -1;
11
talktimer = 0;
12
rtimer = 0;
13
cantalk = true;
14
evidence_counter = 0;
15
init_x = x;
16
init_y = y;
17
fight_type = "blue&yellow";
18
state_string = "";
19
healingraintimer = 0;
20
healingraincon = 0;
21
all_evidence_gathered = stringsetloc(
All#evidence#gathered.
"All#evidence#gathered.", "obj_blue_enemy_slash_Create_0_gml_35_0"
);
22
blue_hint_1a = stringset("");
23
blue_hint_1b = stringset("");
24
blue_hint_1c = stringset("");
25
blue_hint_2a = stringset("");
26
blue_hint_2b = stringset("");
27
blue_hint_2c = stringset("");
28
blue_hint_3a = stringset("");
29
blue_hint_3b = stringset("");
30
blue_hint_3c = stringset("");
31
blue_hint_3d = stringset("");
32
blue_hint_3e = stringset("");
33
blue_hint_4a = stringset("");
34
blue_hint_4b = stringset("");
35
blue_hint_4c = stringset("");
36
help_out_3 = stringsetloc(
* TP up!
"* TP up!", "obj_blue_enemy_slash_Create_0_gml_55_0"
);
37
blue_evidence_1 = stringsetloc(
I see,Delay 11 you
didn't gather
enough evidence...Wait for inputClose Message
"I see^1, you&didn't gather&enough evidence.../%", "obj_blue_enemy_slash_Create_0_gml_57_0"
);
38
blue_evidence_2 = stringsetloc(
Let these light
your way.Wait for inputClose Message
"Let these light&your way./%", "obj_blue_enemy_slash_Create_0_gml_58_0"
);
39
blue_evidence_3 = stringsetloc(
* (You received EVIDENCE.)Wait for inputClose Message
"* (You received EVIDENCE.)/%", "obj_blue_enemy_slash_Create_0_gml_59_0"
);
40
blue_evidence_4 = stringsetloc(
* But you already have all the evidence you need!Wait for inputClose Message
"* But you already have all the evidence you need!/%", "obj_blue_enemy_slash_Create_0_gml_60_0"
);
41
simulcheck = false;
42
43
give_hint = function()
44
{
45
    idlesprite = spr_blue_poses;
46
    image_index = 0;
47
    image_speed = 0;
48
    with (obj_yellow_enemy)
49
        evidence_got[trial_counter] = true;
50
    switch (obj_yellow_enemy.trial_counter)
51
    {
52
        case 0:
53
            msgset_add(blue_hint_1a, x - 30, y + 55, 10, 50);
54
            msgset_add(blue_hint_1b, x - 30, y + 55, 10, 50);
55
            msgset_add(blue_hint_1c, x - 30, y + 55, 10, 50);
56
            msgset_add_func(function()
57
            {
58
                actcon = 0.5;
59
            });
60
            break;
61
        case 1:
62
            msgset_add(blue_hint_2a, x - 20, y + 25, 10, 50);
63
            msgset_add(blue_hint_2b, x - 20, y + 25, 10, 50);
64
            msgset_add(blue_hint_2c, x - 20, y + 25, 10, 50);
65
            msgset_add_func(function()
66
            {
67
                actcon = 0.5;
68
            });
69
            break;
70
        case 2:
71
            msgset_add(blue_hint_3a, x - 20, y + 25, 10, 50);
72
            msgset_add(blue_hint_3b, x - 20, y + 25, 10, 50);
73
            msgset_add(blue_hint_3c, x - 20, y + 25, 10, 50);
74
            msgset_add(blue_hint_3d, x - 20, y + 25, 10, 50);
75
            msgset_add(blue_hint_3e, x - 20, y + 25, 10, 50);
76
            msgset_add_func(function()
77
            {
78
                actcon = 0.5;
79
            });
80
            break;
81
        case 3:
82
            msgset_add(blue_hint_4a, x - 20, y + 25, 10, 50);
83
            msgset_add(blue_hint_4b, x - 20, y + 25, 10, 50);
84
            msgset_add(blue_hint_4c, x - 20, y + 25, 10, 50);
85
            msgset_add_func(function()
86
            {
87
                actcon = 0.5;
88
            });
89
            break;
90
    }
91
};
92
93
blue_balloon_control = function()
94
{
95
    if ((button3_p() && talktimer > 15) || !instance_exists(obj_writer))
96
    {
97
        
scr_destroy_writers
scr_destroy_writers

function
scr_destroy_writers(arg0 = -4)
{ if (arg0 == -4) { with (obj_writer) instance_destroy(); exit; } with (obj_writer) { if (!variable_instance_exists(id, arg0)) instance_destroy(); } }
("text_immune");
98
        if (i_ex(obj_balloon_queue))
99
            msgset_fromqueue();
100
    }
101
};
102
103
blue_balloon = function(arg0 = x - 20, arg1 = y + 25)
104
{
105
    if (i_ex(obj_balloon_queue))
106
        msgset_fromqueue();
107
};
108
109
perph = function(arg0)
110
{
111
    with (arg0)
112
        return (sprite_get_height(sprite_index) - sprite_get_yoffset(sprite_index)) * 2;
113
};
114
115
done_intro = false;