Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_jg_1_Create_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var box = obj_dialogue_box_battle_transformation_any
4
speaker_right = instance_create_depth((box.bbox_right + 80), (box.bbox_bottom - 6), (obj_heart_battle_fighting_red.depth - 1), obj_battle_enemy_attack_goosic_speaker)
5
speaker_left = instance_create_depth((box.bbox_left - 80), (box.bbox_bottom - 6), (obj_heart_battle_fighting_red.depth - 1), obj_battle_enemy_attack_goosic_speaker)
6
speaker_left.image_xscale = -1
7
audio_pos_x = 0
8
audio_pos_x_current = 0
9
audio_pos = "middle"
10
spawn_notes = false
11
spawn_interval = 2
12
spawn_interval_max = spawn_interval
13
spawn_offset_x = 0
14
spawn_offset_x_max = 40
15
spawn_offset_x_inc = 20
16
spawn_offset_dir = 1
17
depth = 0
18
scr_enable_battle_box_surface
scr_enable_battle_box_surface

function scr_enable_battle_box_surface() //gml_Script_scr_enable_battle_box_surface { if (!instance_exists(obj_surface_drawer)) instance_create_depth(0, 0, -999, obj_surface_drawer) }
()
19
alarm[0] = 15
alarm[0]

if live_call() return global.live_result; audio_pos = choose("left", "right") spawn_offset_x = 0 spawn_interval = 5 if (audio_pos == "right") { speaker_right.image_speed = 1 spawn_offset_dir = 1 } else { speaker_left.image_speed = 1 spawn_offset_dir = -1 } alarm[3] = 30
20
attack_duration = 15
21
alarm[2] = room_speed * 9
alarm[2]

show_debug_message("DESTROY") instance_destroy()
22
var bucket_spawn = instance_create_depth(0, 0, -100, obj_battle_enemy_attack_jandroid_slippery_floor_generator)
23
bucket_spawn.attack_interval = 60
24
bucket_spawn.alarm[2] = 0