Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_cactony_needle_top_generator_Step_0

(view raw script w/o annotations or w/e)
1
if (bbox_top < (box.bbox_top + 5))
2
{
3
    y += y_speed
4
    while (bbox_top > (box.bbox_top + 5))
5
        y -= 1
6
    if (bbox_top == (box.bbox_top + 5))
7
    {
8
        in_box = true
9
        alarm[0] = animate_alarm
alarm[0]

instance_create(x, (bbox_top + 2), obj_battle_enemy_attack_cactony_needle_top_needle) id_needle = global.id_store animate_state = 1
10
    }
11
}
12
if (animate_state == 1)
13
{
14
    image_xscale -= anim_in_speed
15
    image_yscale -= anim_in_speed
16
    if (image_xscale <= anim_min)
17
    {
18
        image_xscale = anim_min
19
        image_yscale = anim_min
20
        animate_state = 2
21
    }
22
}
23
else if (animate_state == 2)
24
{
25
    image_xscale += anim_out_speed
26
    image_yscale += anim_out_speed
27
    if (image_xscale >= anim_max)
28
    {
29
        image_xscale = anim_max
30
        image_yscale = anim_max
31
        animate_state = 0
32
        event_user(0)
33
    }
34
}