Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_enemy_bluebird_Create_0

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

function
scr_board_enemy_init()
{ image_speed = 0.1;
scr_darksize();
scr_depth_board();
init = 0; damage = 1; hp = 1; maxhp = hp; xp_given = 1; state = "init"; timer = 0; updatetimer = 0; drop_candy = true; show_outline = false; sword_immunity_lv = 1; savex = x; savey = y; spawnerid = -1; dontmoveduringhurt = false; aggressive = obj_board_controller.violence; active = true; active_hitbox = aggressive; damagecon = 0; damagetimer = 0; hurttimer = 0; hitdir = -1; path = path_add(); is_moving = false; is_moving_timer = 0; move_type = 0; distance_to_become_aggressive = 90; movecon = 0; movetimer = 0; movedir = 1; spd = 3; damage_hitbox = instance_create(x + 16, y + 16, obj_board_enemy_contact_hitbox); damage_hitbox.parentid = id; damage_hitbox.active_hitbox = active_hitbox; idle_sprite_r = 0; idle_sprite_l = 0; hurt_sprite = spr_board_monster_hurt; }
();
2
image_speed = 0;
3
depth = 100002;
4
show_outline = false;
5
bulletimer = 0;
6
target_x = x;
7
target_y = y;
8
hspd = 0;
9
vspd = 0;
10
pathspd = 8;
11
if (room == room_board_dungeon_2)
12
{
13
    y = obj_mainchara_board.y;
14
    if (obj_mainchara_board.x > (x - 32))
15
        obj_mainchara_board.x = x - 32;
16
    sprite_index = spr_board_blue_bird_waddle;
17
}
18
x = clamp(x, 128, 480);
19
y = clamp(y, 96, 256);