Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_dunebud_chase_attack_Create_0

(view raw script w/o annotations or w/e)
1
damage_number = scr_determine_damage_number_enemy
scr_determine_damage_number_enemy

function scr_determine_damage_number_enemy(argument0, argument1, argument2) //gml_Script_scr_determine_damage_number_enemy { var enemy_count = global.enemy_count if (global.battle_enemy_name_1 == argument0) return 1; else if (enemy_count >= 2 && global.battle_enemy_name_2 == argument1) return 2; else if (enemy_count >= 3 && global.battle_enemy_name_3 == argument2) return 3; else return 0; }
("dunebud a", "dunebud b", "dunebud c")
2
id_dunebud_enemy = global.id_store
3
global.id_store = id
4
with (id_dunebud_enemy)
5
    id_dunebud_attack = global.id_store
6
id_dunebud_particles = -4
7
side = 0
8
if (id_dunebud_enemy.id_dunebud.sprite_index == spr_dunebud_critical)
9
    critical = true
10
else
11
    critical = false
12
if (critical == true)
13
{
14
    sprite_rise[0] = spr_dunebud_attack_rise_c_r
15
    sprite_rise[1] = spr_dunebud_attack_rise_c
16
    sprite_sink[0] = 1838
17
    sprite_sink[1] = 1826
18
    sprite_move[0] = 1839
19
    sprite_move[1] = 1827
20
}
21
else
22
{
23
    sprite_rise[0] = spr_dunebud_attack_rise_r
24
    sprite_rise[1] = spr_dunebud_attack_rise
25
    sprite_sink[0] = 1829
26
    sprite_sink[1] = 1817
27
    sprite_move[0] = 1832
28
    sprite_move[1] = 1818
29
}
30
sprite_fly_begin[0] = 1833
31
sprite_fly_begin[1] = 1819
32
sprite_fly[0] = 1834
33
sprite_fly[1] = 1821
34
sprite_fly_end[0] = 1835
35
sprite_fly_end[1] = 1823
36
sprite_index = sprite_rise[side]
37
image_speed_rise = (1/3)
38
image_speed_sink = (1/3)
39
if (critical == true)
40
    image_speed_move = 0.16666666666666666
41
else
42
    image_speed_move = (1/3)
43
image_speed_fly_begin = (1/3)
44
image_speed_fly = 0
45
image_speed_fly_end = (1/3)
46
image_speed = image_speed_rise
47
image_index = 0
48
can_sink = false
49
alarm[0] = 180
alarm[0]

can_sink = true
50
if (global.battle_enemy_name == "dunebud duo")
51
    alarm[0] = 220
alarm[0]

can_sink = true
52
state = "animate"
53
if (critical == true)
54
{
55
    move_max = 1
56
    move_accel = 0.16666666666666666
57
    move_speed = 0
58
    move_sign = 0
59
}
60
else
61
{
62
    move_max = 6
63
    move_accel = 1
64
    move_speed = 0
65
    move_sign = 0
66
}
67
fly_speed = 10