Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_guardener_guy_throwing_hands_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (robot_parent != noone)
4
{
5
    switch robot_parent.object_index
6
    {
7
        case obj_guardener_guy_a_noarms:
8
            x = robot_parent.x - 3
9
            y = robot_parent.y - 15
10
            break
11
        case 2390:
12
            x = robot_parent.x + 3
13
            y = robot_parent.y - 10
14
            break
15
    }
16
17
}
18
if (image_speed == 0)
19
{
20
    if (throw_delay > 0)
21
        throw_delay--
22
    else
23
    {
24
        image_index = 0
25
        image_speed = 1
26
        if (bombs == true)
27
            throw_delay = throw_delay_bomb
28
    }
29
}
30
if (image_index >= (image_number - 1))
31
{
32
    image_speed = 0
33
    image_index = 0
34
    throw_noloop = false
35
}
36
if (image_index >= 5 && throw_noloop == false)
37
{
38
    if (bombs == true)
39
    {
40
        var dir_min = 60
41
        var dir_max = 80
42
        var item = instance_create_depth(x, y, depth, obj_battle_enemy_attack_guardener_throwable_bomb)
43
        item.direction = (irandom_range(dir_min, dir_max)) * image_xscale
44
        item.speed = 8 * image_xscale
45
    }
46
    else
47
    {
48
        item = instance_create_depth(x, y, depth, obj_battle_enemy_attack_guardener_throwable_item)
49
        dir_min = 25
50
        dir_max = 80
51
        item.direction = (irandom_range(dir_min, dir_max)) * image_xscale
52
        item.speed = 8 * image_xscale
53
    }
54
    throw_noloop = true
55
}