Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_enemy_attack_candy_spear_corn

(view raw script w/o annotations or w/e)
1
function scr_enemy_attack_candy_spear_corn
scr_enemy_attack_candy_spear_corn

function scr_enemy_attack_candy_spear_corn() //gml_Script_scr_enemy_attack_candy_spear_corn { var distance = 20 global.attack_counter_max = 25 if (global.attack_counter == 0) { if (global.timer_attacks_counter == 0) instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance), obj_heart_battle_fighting_parent.y, obj_battle_enemy_attack_candy_corn) else if (global.timer_attacks_counter == 1) instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance), obj_heart_battle_fighting_parent.y, obj_battle_enemy_attack_candy_corn) global.timer_attacks_counter += 1 if (global.timer_attacks_counter > 1) global.timer_attacks_counter = 0 } }
() //gml_Script_scr_enemy_attack_candy_spear_corn
2
{
3
    var distance = 20
4
    global.attack_counter_max = 25
5
    if (global.attack_counter == 0)
6
    {
7
        if (global.timer_attacks_counter == 0)
8
            instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance), obj_heart_battle_fighting_parent.y, obj_battle_enemy_attack_candy_corn)
9
        else if (global.timer_attacks_counter == 1)
10
            instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance), obj_heart_battle_fighting_parent.y, obj_battle_enemy_attack_candy_corn)
11
        global.timer_attacks_counter += 1
12
        if (global.timer_attacks_counter > 1)
13
            global.timer_attacks_counter = 0
14
    }
15
}