Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_fmartlet_spawner_feathers_wings_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 20:
7
        self.martlet_wing_spawn(0)
8
        break
9
    case 40:
10
        self.martlet_wing_spawn(1)
11
        break
12
    case 60:
13
        var attack_instance = instance_create_depth((battle_box.bbox_left - 30), (battle_box.bbox_top - 20), -100, obj_martlet_attack_splitting_feather)
14
        attack_instance.x_target_override = battle_box.bbox_right - 30
15
        attack_instance.y_target_override = battle_box.bbox_bottom - 30
16
        break
17
    case 70:
18
        attack_instance = instance_create_depth((battle_box.bbox_left - 30), (battle_box.bbox_bottom + 20), -100, obj_martlet_attack_splitting_feather)
19
        attack_instance.x_target_override = battle_box.bbox_right - 30
20
        attack_instance.y_target_override = battle_box.bbox_top + 30
21
        break
22
    case 100:
23
        self.martlet_wing_spawn(1)
24
        break
25
    case 120:
26
        attack_instance = instance_create_depth((battle_box.bbox_right + 30), battle_box.y, -100, obj_martlet_attack_splitting_feather)
27
        attack_instance.x_target_override = battle_box.x
28
        attack_instance.y_target_override = battle_box.y
29
        break
30
    case 140:
31
        attack_instance = instance_create_depth((battle_box.bbox_left + 20), (battle_box.bbox_top - 20), -100, obj_martlet_attack_splitting_feather)
32
        attack_instance.x_target_override = battle_box.bbox_right - 20
33
        attack_instance.y_target_override = battle_box.bbox_bottom - 30
34
        break
35
    case 150:
36
        attack_instance = instance_create_depth((battle_box.bbox_right - 20), (battle_box.bbox_top - 20), -100, obj_martlet_attack_splitting_feather)
37
        attack_instance.x_target_override = battle_box.bbox_left + 20
38
        attack_instance.y_target_override = battle_box.bbox_bottom - 30
39
        break
40
    case 240:
41
        instance_destroy()
42
        break
43
}
44
45
function martlet_wing_spawn_gml_Object_obj_fmartlet_spawner_feathers_wings_Step_0(argument0) //gml_Script_martlet_wing_spawn_gml_Object_obj_fmartlet_spawner_feathers_wings_Step_0
46
{
47
    battle_box = obj_dialogue_box_battle_transformation_any
48
    var xx = 0
49
    var yy = 0
50
    var xscale = 1
51
    var yscale = 1
52
    var angle = 0
53
    switch argument0
54
    {
55
        case 0:
56
            xx = battle_box.bbox_left + 4
57
            yy = battle_box.bbox_top + 30
58
            break
59
        case 1:
60
            xx = battle_box.bbox_right - 4
61
            yy = battle_box.bbox_top + 30
62
            xscale = -1
63
            break
64
    }
65
66
    var wing = instance_create_depth(xx, yy, -50, obj_fmartlet_wings)
67
    with (wing)
68
    {
69
        image_xscale = xscale
70
        image_yscale = yscale
71
        image_angle = angle
72
    }
73
}
74
75
attack_tick += 1