Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_macro_space_frog_creator_Create_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var battle_box = obj_dialogue_box_battle_transformation_any
4
attack_tick = 0
5
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) }
()
6
obj_surface_drawer.depth = -100
7
frog_green_noloop = false
8
frog_green_chance = 8
9
meteor_count = 14
10
meteor_delay = 30
11
alarm[0] = 30
alarm[0]

if live_call() return global.live_result; var battle_box = obj_dialogue_box_battle_transformation_any if (irandom(frog_green_chance) == 1 && frog_green_noloop == false) { is_green = true frog_green_noloop = true var meteor = instance_create_depth((battle_box.bbox_right + 10), irandom_range((battle_box.bbox_top + 20), (battle_box.bbox_bottom - 20)), -100, obj_battle_enemy_attack_space_green_frog) } else { meteor = instance_create_depth((battle_box.bbox_right + 10), irandom_range((battle_box.bbox_top - 20), (battle_box.bbox_bottom + 20)), -100, obj_battle_enemy_attack_space_rock) if (frog_green_chance > 1) frog_green_chance-- } if (meteor.y > battle_box.y) meteor.direction = irandom_range(135, 180) else meteor.direction = irandom_range(180, 225) meteor.speed = 2 meteor_count-- if (meteor_count <= 0) instance_destroy() alarm[0] = meteor_delay
12
instance_create_depth(0, 0, 50, obj_battle_enemy_attack_space_rock_space)
13
instance_create_depth((battle_box.bbox_left - 64), irandom_range((battle_box.y - 30), (battle_box.y + 30)), -1000, obj_battle_enemy_attack_space_frog)