Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_flower_spiral_spawner_Step_0

(view raw script w/o annotations or w/e)
1
if (image_alpha < 1)
2
    image_alpha += 0.1
3
else if (!alarm[0])
4
    alarm[0] = 10
alarm[0]

for (var i = 0; i < bullet_number; i++) { var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spiral_bullet) bullet.attack_dir = (i + 1) * (360 / bullet_number) bullet.creator = id if (bullet.attack_dir > 360) bullet.attack_dir -= 360 } if (bullet_number == 6) bullet_number = 7 else bullet_number = 6 alarm[0] = 30 if (global.battle_phase == 2) alarm[0] = 20 image_xscale = 1.5 image_yscale = 1.5
5
if (can_move == true)
6
{
7
    if (dir == "right")
8
    {
9
        if (x > obj_dialogue_box_battle_transformation_any.bbox_right && hspeed > 0)
10
            hspeed -= 0.2
11
        else if (hspeed < move_speed)
12
            hspeed += 0.1
13
    }
14
    if (dir == "left")
15
    {
16
        if (x < obj_dialogue_box_battle_transformation_any.bbox_left && hspeed < 0)
17
            hspeed += 0.2
18
        else if (hspeed > (-move_speed))
19
            hspeed -= 0.2
20
    }
21
    if (dir == "left" || dir == "right")
22
    {
23
        if (hspeed == 0 && y < obj_dialogue_box_battle_transformation_any.bbox_bottom)
24
            dir = "down"
25
        else if (hspeed == 0)
26
            dir = "up"
27
    }
28
    if (dir == "down")
29
    {
30
        if (y > obj_dialogue_box_battle_transformation_any.bbox_bottom && vspeed > 0)
31
            vspeed -= 0.2
32
        else if (vspeed < move_speed)
33
            vspeed += 0.2
34
    }
35
    if (dir == "up")
36
    {
37
        if (y < obj_dialogue_box_battle_transformation_any.bbox_top && vspeed < 0)
38
            vspeed += 0.2
39
        else if (vspeed > (-move_speed))
40
            vspeed -= 0.2
41
    }
42
    if (dir == "up" || dir == "down")
43
    {
44
        if (vspeed == 0 && x < obj_dialogue_box_battle_transformation_any.bbox_right)
45
            dir = "right"
46
        else if (vspeed == 0)
47
            dir = "left"
48
    }
49
}
50
if (image_xscale > 1)
51
    image_xscale -= 0.05
52
if (image_yscale > 1)
53
    image_yscale -= 0.05