Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_bullet_2_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (!instance_exists(obj_dialogue_box_battle_transformation_any))
4
{
5
    instance_destroy()
6
    return;
7
}
8
var battle_box = obj_dialogue_box_battle_transformation_any
9
if (aim > 0)
10
{
11
    direction += ((angle_difference(point_direction(x, y, target_x, target_y), direction)) * turn_rate)
12
    aim--
13
}
14
if ((y + 23) >= battle_box.bbox_bottom && destroy_on_contact == true)
15
{
16
    scr_screenshake_battle
scr_screenshake_battle

function scr_screenshake_battle() //gml_Script_scr_screenshake_battle { instance_destroy(obj_screenshake_battle) var screenshake = instance_create(0, 0, obj_screenshake_battle) battle_screenshake_duration = argument[0] battle_screenshake_intensity = argument[1] battle_screenshake_dec = battle_screenshake_intensity / battle_screenshake_duration }
(8, 2)
17
    instance_create_depth(x, (battle_box.bbox_bottom - 4), -100, obj_battle_enemy_attack_bullet_impact)
18
    var deg_dec = 26
19
    for (var i = 155; i > 0; i -= deg_dec)
20
    {
21
        var residue = instance_create_depth(x, (battle_box.bbox_bottom - 4), -100, obj_battle_enemy_attack_bullet_residue)
22
        residue.speed = 5
23
        residue.direction = i
24
    }
25
    instance_destroy()
26
}