Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_gerson_item_steal_anim_Step_0

(view raw script w/o annotations or w/e)
1
timer++;
2
if (timer == 3)
3
    sprite_index = spr_nothing;
4
if (timer == 13)
5
{
6
    sprite_index = spr_gerson_item_steal2;
7
    image_index = 0;
8
    direction = 270;
9
    speed = 4;
10
    friction = 0.4;
11
    x = (obj_gerson_item_throw.x - 96) + 6;
12
    y = obj_gerson_item_throw.y - 89;
13
    snd_stop(motor_swing_down);
14
    snd_play_pitch(motor_swing_down, 1.4);
15
}
16
if (timer == 15)
17
    image_speed = 0;
18
if (timer == 22)
19
{
20
    with (obj_gerson_item_throw)
21
        instance_destroy();
22
    with (obj_gerson_item_throw_particle)
23
        instance_destroy();
24
    snd_play(snd_item);
25
}
26
if (timer == 24)
27
{
28
    sprite_index = spr_gerson_item_steal2;
29
    image_index = 1;
30
    image_speed = 1;
31
    snd_stop(motor_swing_down);
32
    snd_play_pitch(motor_swing_down, 1.4);
33
}
34
if (timer == 25)
35
    sprite_index = spr_nothing;
36
if (timer == 31)
37
{
38
    x = obj_hammer_of_justice_enemy.x + 20 + 24;
39
    y = obj_hammer_of_justice_enemy.y - 30;
40
    sprite_index = spr_gerson_smear;
41
    image_index = 1;
42
    image_speed = 0;
43
}
44
if (timer == 32)
45
{
46
    x = (obj_hammer_of_justice_enemy.x - 10) + 24;
47
    y = obj_hammer_of_justice_enemy.y;
48
    snd_stop(motor_swing_down);
49
    snd_play_pitch(motor_swing_down, 1.4);
50
    sprite_index = spr_gerson_laugh;
51
    image_index = 0;
52
    image_speed = 0.25;
53
    direction = 180;
54
    speed = 2;
55
    friction = 0.2;
56
}
57
if (timer > 50 && !i_ex(obj_writer))
58
{
59
    if (con == 0)
60
    {
61
        with (obj_hammer_of_justice_enemy)
62
        {
63
            global.typer = 50;
64
            msgsetloc(0, 
Woah there!
I ain't usin' items,
so fair's fair,
ain't it!?Wait for inputClose Message
"Woah there!&I ain't usin' items,&so fair's fair,&ain't it!?/%", "obj_gerson_item_steal_anim_slash_Step_0_gml_71_0"
);
65
            
scr_enemyblcon
scr_enemyblcon

function
scr_enemyblcon(arg0, arg1, arg2)
{ if (arg2 == 0) { mywriter = instance_create(arg0, arg1, obj_writer); return mywriter; } if (arg2 == 1) { myblcon = instance_create(arg0, arg1, obj_battleblcon); return myblcon; } if (arg2 == 2) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v; return myblcon; } if (arg2 == 3) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; return myblcon; } if (arg2 == 4) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.image_index = 0; myblcon.image_speed = 0; return myblcon; } if (arg2 == 5) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.image_index = 1; myblcon.image_speed = 0; return myblcon; } if (arg2 == 6) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_clubs; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 7) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_r; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 8) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_tall; return myblcon; } if (arg2 == 10) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.auto_length = 1; return myblcon; } if (arg2 == 11) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_z; return myblcon; } }
(x - 10, global.monstery[myself], 10);
66
        }
67
        con = 1;
68
    }
69
    else if (con == 1)
70
    {
71
        instance_destroy();
72
    }
73
}
74
with (obj_spellphase)
75
    spelltimer = 290;