Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_super_ball_1_creator_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
switch scene
4
{
5
    case -1:
6
        break
7
    case 0:
8
        if (box_resize == true && (!(scr_battle_box_resize_midfight
scr_battle_box_resize_midfight

function scr_battle_box_resize_midfight() //gml_Script_scr_battle_box_resize_midfight { if instance_exists(obj_dialogue_box_battle_transformation_any) { with (obj_dialogue_box_battle_transformation_any) { battle_box_resize_midfight = true battle_box_target_xscale = argument[0] / sprite_get_width(sprite_index) battle_box_target_yscale = argument[1] / sprite_get_height(sprite_index) if (argument_count > 2) { battle_box_target_x = argument[2] battle_box_target_y = argument[3] } if (abs(image_xscale - battle_box_target_xscale) < 0.01 && abs(image_yscale - battle_box_target_yscale) < 0.01 && abs(x - battle_box_target_x) < 0.1 && abs(y - battle_box_target_y) < 0.1) { var box = obj_dialogue_box_battle_transformation_any global.attack_surface_width = box.sprite_width - 8 global.attack_surface_height = box.sprite_height - 8 global.attack_surface_x = box.x - global.attack_surface_width * 0.5 global.attack_surface_y = box.y - global.attack_surface_height * 0.5 if surface_exists(global.attack_surface) global.attack_surface = surface_create(global.attack_surface_width, global.attack_surface_height) return true; } } } else return false; }
(280, 140))))
9
            return;
10
        with (obj_axis_body)
11
        {
12
            sprite_index = spr_axis_body_charge
13
            image_index = 0
14
            image_speed = 1
15
        }
16
        scene++
17
        break
18
    case 1:
19
        with (obj_axis_body)
20
        {
21
            if (image_index >= (image_number - 1))
22
            {
23
                sprite_index = spr_axis_body_charge_hold
24
                other.scene++
25
            }
26
        }
27
        break
28
    case 2:
29
        var ball = instance_create_depth(obj_axis_body.x, (obj_axis_body.y - 80), -300, obj_battle_enemy_attack_axis_energy_ball_boss_red)
30
        ball.launch_speed = launch_speed
31
        scene++
32
        break
33
    case 3:
34
        obj_axis_body.x = 320 + sin(degtorad(axis_deg)) * axis_x_offset
35
        axis_deg += axis_deg_inc
36
        if (axis_deg > 360)
37
            axis_deg -= 360
38
        if (!instance_exists(obj_battle_enemy_attack_axis_energy_ball_boss_red))
39
            instance_destroy()
40
        break
41
    default:
42
43
}