Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_flower_spiral_spawner_pacifist_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (image_alpha < 1)
4
    image_alpha += 0.1
5
else if (!alarm[0])
6
    alarm[0] = 10
alarm[0]

if live_call() return global.live_result; 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] = 40 image_xscale = 1.5 image_yscale = 1.5
7
if (can_move == true)
8
{
9
    if (dir == "right")
10
    {
11
        if (x > obj_dialogue_box_battle_transformation_any.bbox_right && hspeed > 0)
12
            hspeed -= 0.2
13
        else if (hspeed < move_speed)
14
            hspeed += 0.1
15
    }
16
    if (dir == "left")
17
    {
18
        if (x < obj_dialogue_box_battle_transformation_any.bbox_left && hspeed < 0)
19
            hspeed += 0.2
20
        else if (hspeed > (-move_speed))
21
            hspeed -= 0.2
22
    }
23
    if (dir == "left" || dir == "right")
24
    {
25
        if (hspeed == 0 && y < obj_dialogue_box_battle_transformation_any.bbox_bottom)
26
            dir = "down"
27
        else if (hspeed == 0)
28
            dir = "up"
29
    }
30
    if (dir == "down")
31
    {
32
        if (y > obj_dialogue_box_battle_transformation_any.bbox_bottom && vspeed > 0)
33
            vspeed -= 0.2
34
        else if (vspeed < move_speed)
35
            vspeed += 0.2
36
    }
37
    if (dir == "up")
38
    {
39
        if (y < obj_dialogue_box_battle_transformation_any.bbox_top && vspeed < 0)
40
            vspeed += 0.2
41
        else if (vspeed > (-move_speed))
42
            vspeed -= 0.2
43
    }
44
    if (dir == "up" || dir == "down")
45
    {
46
        if (vspeed == 0 && x < obj_dialogue_box_battle_transformation_any.bbox_right)
47
            dir = "right"
48
        else if (vspeed == 0)
49
            dir = "left"
50
    }
51
}
52
if (image_xscale > 1)
53
    image_xscale -= 0.05
54
if (image_yscale > 1)
55
    image_yscale -= 0.05