Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_fmartlet_spawner_wings_scratch_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var battle_box = obj_dialogue_box_battle_transformation_any
4
switch attack_tick
5
{
6
    case 30:
7
        var scratch_instance = instance_create_depth(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, -100, obj_martlet_attack_talon)
8
        scratch_instance.attack_delay = 10
9
        break
10
    case 45:
11
        scratch_instance = instance_create_depth(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, -100, obj_martlet_attack_talon)
12
        scratch_instance.image_xscale = -1
13
        scratch_instance.attack_delay = 10
14
        break
15
    case 60:
16
        scratch_instance = instance_create_depth(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, -100, obj_martlet_attack_talon)
17
        scratch_instance.attack_delay = 70
18
        self.martlet_wing_spawn(0)
19
        break
20
    case 120:
21
        self.martlet_wing_spawn(1)
22
        break
23
    case 145:
24
        self.martlet_wing_spawn(0)
25
        break
26
    case 170:
27
        scratch_instance = instance_create_depth(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, -100, obj_martlet_attack_talon)
28
        scratch_instance.attack_delay = 40
29
        scratch_instance.image_xscale = -1
30
        scratch_instance = instance_create_depth(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, -100, obj_martlet_attack_talon)
31
        scratch_instance.attack_delay = 80
32
        self.martlet_wing_spawn(0)
33
        break
34
    case 210:
35
        self.martlet_wing_spawn(1)
36
        break
37
    case 300:
38
        instance_destroy()
39
        break
40
}
41
42
function martlet_wing_spawn_gml_Object_obj_fmartlet_spawner_wings_scratch_Step_0(argument0) //gml_Script_martlet_wing_spawn_gml_Object_obj_fmartlet_spawner_wings_scratch_Step_0
43
{
44
    battle_box = obj_dialogue_box_battle_transformation_any
45
    var xx = 0
46
    var yy = 0
47
    var xscale = 1
48
    var yscale = 1
49
    var angle = 0
50
    switch argument0
51
    {
52
        case 0:
53
            xx = battle_box.bbox_left + 4
54
            yy = battle_box.bbox_top + 30
55
            break
56
        case 1:
57
            xx = battle_box.bbox_right - 4
58
            yy = battle_box.bbox_top + 30
59
            xscale = -1
60
            break
61
    }
62
63
    var wing = instance_create_depth(xx, yy, -50, obj_fmartlet_wings)
64
    with (wing)
65
    {
66
        feather_count = 0
67
        image_xscale = xscale
68
        image_yscale = yscale
69
        image_angle = angle
70
    }
71
}
72
73
attack_tick += 1