Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shutta_photo_controller_Other_16

(view raw script w/o annotations or w/e)
1
reticle_over_good_shot = false;
2
if (place_meeting(x, y, obj_heroparent) || (place_meeting(x, y, obj_shutta_enemy) && collision_circle(x, y, reticle_size + 40, obj_shutta_enemy, false, true)))
3
    reticle_over_good_shot = true;
4
switch (subact_state)
5
{
6
    case "init":
7
        with (enemy)
8
        {
9
            x = xstart;
10
            y = ystart;
11
            sprite_index = spr_shutta_idle;
12
            image_speed = 0.16666666666666666;
13
        }
14
        subact_state = "wait";
15
        break;
16
    case "wait":
17
        break;
18
    case "capture":
19
        subact_state = "post_capture";
20
        obj_shutta_photo_controller.endmessage = message_default;
21
        if (got_kris && closest_hero == "kris")
22
        {
23
            enemy.photosuccessballoon = 1;
24
            if (enemy.amiabossfight == true)
25
            {
26
                obj_shutta_photo_controller.endmessage = message_kris;
27
                if (global.flag[513 shuttah_kris_pic] > 0)
28
                    obj_shutta_photo_controller.endmessage = message_kris2;
29
            }
30
            global.flag[513 shuttah_kris_pic] = 1;
31
            if (powerphoto)
32
                mercygained += 10;
33
            mercygained += 10;
34
            if (!i_ex(obj_shutta_text))
35
            {
36
                var _comment = instance_create(x, y, obj_shutta_text);
37
                _comment.text = comment_center;
38
                _comment.color = c_yellow;
39
            }
40
        }
41
        else if (got_susie && closest_hero == "susie")
42
        {
43
            enemy.photosuccessballoon = 1;
44
            if (enemy.amiabossfight == true)
45
            {
46
                obj_shutta_photo_controller.endmessage = message_susie;
47
                if (global.flag[514 shuttah_susie_pic] > 0)
48
                    obj_shutta_photo_controller.endmessage = message_susie2;
49
            }
50
            global.flag[514 shuttah_susie_pic] = 1;
51
            if (powerphoto)
52
                mercygained += 10;
53
            mercygained += 10;
54
            if (!i_ex(obj_shutta_text))
55
            {
56
                var _comment = instance_create(x, y, obj_shutta_text);
57
                _comment.text = comment_center;
58
                _comment.color = c_yellow;
59
            }
60
        }
61
        else if (got_ralsei && closest_hero == "ralsei")
62
        {
63
            enemy.photosuccessballoon = 1;
64
            if (enemy.amiabossfight == true)
65
            {
66
                if (global.flag[515 shuttah_ralsei_pic] == 0)
67
                    obj_shutta_photo_controller.endmessage = message_ralsei;
68
                if (global.flag[515 shuttah_ralsei_pic] > 0)
69
                    obj_shutta_photo_controller.endmessage = message_ralsei2;
70
            }
71
            global.flag[515 shuttah_ralsei_pic] = 1;
72
            if (powerphoto)
73
                mercygained += 10;
74
            mercygained += 10;
75
            if (!i_ex(obj_shutta_text))
76
            {
77
                var _comment = instance_create(x, y, obj_shutta_text);
78
                _comment.text = comment_center;
79
                _comment.color = c_yellow;
80
            }
81
        }
82
        else if (place_meeting(x, y, obj_shutta_enemy) && collision_circle(x, y, reticle_size + 40, obj_shutta_enemy, false, true))
83
        {
84
            enemy.photosuccessballoon = 1;
85
            if (obj_shutta_enemy.amiabossfight == true)
86
            {
87
                if (powerphoto)
88
                    mercygained += 10;
89
                mercygained += 10;
90
            }
91
            else
92
            {
93
                if (powerphoto)
94
                    mercygained += 25;
95
                mercygained += 25;
96
            }
97
            if (!i_ex(obj_shutta_text))
98
            {
99
                var _comment = instance_create(x, y, obj_shutta_text);
100
                _comment.text = comment_center;
101
                _comment.color = c_yellow;
102
            }
103
            obj_shutta_photo_controller.endmessage = message_nicephoto;
104
            if (obj_shutta_enemy.amiabossfight == true)
105
                obj_shutta_photo_controller.endmessage = message_nicephoto2;
106
        }
107
        else
108
        {
109
            mercygained += 6;
110
        }
111
        break;
112
    case "post_capture":
113
        break;
114
}