Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_movingEnemy_Step_0

(view raw script w/o annotations or w/e)
1
if (tilecon == 0)
2
{
3
    if (moving == 1)
4
    {
5
        if (dir == 0)
6
        {
7
            y += 2;
8
            if (y >= (obj_board_anchor.y + 32))
9
                dir = 1;
10
        }
11
        else
12
        {
13
            y -= 2;
14
            if (y <= (obj_board_anchor.y - 32))
15
                dir = 0;
16
        }
17
    }
18
}
19
if (tilecon == 1)
20
{
21
    remmoving = obj_mainchara_board.movingnow;
22
    obj_mainchara_board.movingnow = 0;
23
    if (i_ex(obj_board_controller))
24
    {
25
        remphase = obj_board_controller.phase;
26
        obj_board_controller.phase = 2;
27
    }
28
    tilecon = 1.5;
29
}
30
if (tilecon == 1.5)
31
{
32
    wheel = instance_create(0, 0, obj_board_quizwheel);
33
    wheel.maxslices = 4;
34
    wheel.slicetext[0] = "ENEMY1";
35
    wheel.slicetext[1] = "ENEMY2";
36
    wheel.slicetext[2] = "ENEMY3";
37
    wheel.slicetext[3] = "ENEMY4";
38
    wheel.daddy = id;
39
    tilecon = -1;
40
}
41
if (tilecon == 2)
42
{
43
    marker = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(x, y, sprite_index);
44
    image_alpha = 0;
45
    
scr_battle
scr_battle

function
scr_battle(arg0, arg1, arg2, arg3, arg4)
{ global.specialbattle = arg1; global.encounterno = arg0; if (global.flag[9 battle_music] != 2) { global.flag[9 battle_music] = 1; var batmusic = "battle.ogg"; if (global.chapter == 3) { if (global.encounterno == 111 && room == room_board_2) batmusic = "rudebuster_boss.ogg"; if (room == room_dw_b3bs_watercooler || room == room_dw_teevie_watercooler || room == room_dw_b3bs_zapper_b || room == room_dw_ranking_c) batmusic = "battle_vapor.ogg"; if (room == room_dw_teevie_chef) batmusic = "rouxls_battle.ogg"; } global.batmusic[0] = snd_init(batmusic); mus_volume(global.batmusic[1], 1, 0); } instance_create(0, 0, obj_battleback); instance_create(0, 0, obj_encounterbasic); __enemymarker[0] = arg2; __enemymarker[1] = arg3; __enemymarker[2] = arg4; for (__ien = 0; __ien < 3; __ien++) { if (global.monstertype[__ien] != 0(None)) { if (!i_ex(__enemymarker[__ien])) { __enemymarker[__ien] =
scr_dark_marker(global.monstermakex[__ien] + 300, global.monstermakey[__ien], object_get_sprite(global.monsterinstancetype[__ien]));
__enemymarker[__ien].depth = -__ien; } __enemymarker[__ien].__ien = __ien; with (__enemymarker[__ien]) { if (global.monstertype[other.__ien] == 103Tenna) { x = camerax() + 510; y = cameray() + 288;
scr_move_to_point_over_time(camerax() + 526, cameray() + 260, 20);
sprite_index = spr_tenna_point_up; } else if (global.monstertype[other.__ien] == 104Knight) { with (obj_ch3_PTB02_roaringknight) stopsiner2 = true;
scr_move_to_point_over_time(global.monstermakex[__ien], obj_ch3_PTB02_roaringknight.ystart + (cos(obj_ch3_PTB02_roaringknight.siner2 / 8) * 8), 20);
} else {
scr_move_to_point_over_time(global.monstermakex[__ien], global.monstermakey[__ien], 20);
} __doom = instance_create(x, y, obj_doom); __doom.target = id; __doom.alarm[0] = 25; } } } }
(50, 0, marker, 0, 0);
46
    tilecon = 98;
47
}
48
if (tilecon == 98 && !i_ex(obj_battleback))
49
    tilecon = 99;
50
if (tilecon == 99)
51
{
52
    tilecon = 0;
53
    tiledone = 1;
54
    obj_board_controller.phase = 0;
55
    instance_destroy();
56
}