Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_heal_pickup_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    init = 1;
4
    if (type == 2)
5
    {
6
        mysolid = instance_create(x, y, obj_board_solid);
7
        mysolid.sprite_index = sprite_index;
8
        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(mysolid);
9
    }
10
}
11
if (type == 0)
12
{
13
    timer++;
14
    if (timer > 120)
15
    {
16
        if (visible == true)
17
            visible = false;
18
        else
19
            visible = true;
20
    }
21
    if (timer > 150)
22
        instance_destroy();
23
}
24
if (type == 2)
25
{
26
    if (global.flag[1044 points] >= cost)
27
    {
28
        mysolid.x = room_width * 4;
29
    }
30
    else
31
    {
32
        with (mysolid)
33
            setxy(other.x, other.y);
34
    }
35
}
36
if (place_meeting(x, y, obj_board_swordhitbox))
37
    myinteract = 3;
38
if (myinteract == 3)
39
{
40
    if (type == 0)
41
    {
42
        if (timer < 10)
43
            exit;
44
        if (obj_board_controller.kris_object.myhealth < 1)
45
            exit;
46
        instance_destroy();
47
        obj_board_controller.kris_object.myhealth += 2;
48
        snd_play(snd_power);
49
    }
50
    if (type == 1)
51
    {
52
        snd_play(snd_power);
53
        with (obj_mainchara_board)
54
            myhealth += 2;
55
        instance_destroy();
56
    }
57
    if (type == 2)
58
    {
59
        if (global.flag[1044 points] >= cost)
60
        {
61
            
scr_board_score
scr_board_score

function
scr_board_score(arg0)
{ var scoreadder = instance_create(x, y, obj_board_scoreAdder); scoreadder.scoreamount = arg0; if (argument_count == 2) scoreadder.mysnd = argument1; } function scr_board_score_set(arg0) { global.flag[1044 points] = arg0; }
(-cost);
62
            global.flag[1117 points_spent] += cost;
63
            snd_play(snd_power);
64
            with (obj_mainchara_board)
65
                myhealth += 2;
66
            instance_destroy();
67
        }
68
        else
69
        {
70
        }
71
    }
72
    myinteract = 0;
73
}
74
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();