Undertale script viewer

← back to main script listing

gml_Object_obj_encount_fire1_Step_0

(view raw script w/o annotations or w/e)
1
if (global.encounter > steps)
2
{
3
    if (global.phasing == 0)
4
    {
5
        if (global.interact == 0)
6
        {
7
            script_execute(scr_steps, 340, 380, 40, 205);
8
            if (room == room_fire5)
9
                script_execute(scr_steps, 1040, 680, 40, 205);
10
            global.encounter = 0;
11
            battlegroup = floor(random(15));
12
            if (battlegroup < 15)
13
                global.battlegroup = 50;
14
            if (battlegroup < 10)
15
                global.battlegroup = 78;
16
            if (battlegroup < 6)
17
                global.battlegroup = 77;
18
            if (global.flag[8 disable_random_encounters] == 1 || global.flag[7 true_pacifist] == 1)
19
                instance_destroy();
20
            if (global.flag[408 progress_hotland_battles] == 0)
21
                global.battlegroup = 51;
22
            if (global.flag[408 progress_hotland_battles] == 1)
23
                global.battlegroup = 50;
24
            if (global.flag[408 progress_hotland_battles] == 2)
25
                global.battlegroup = 52;
26
            if (global.flag[408 progress_hotland_battles] == 3)
27
                global.battlegroup = 77;
28
            if (global.flag[408 progress_hotland_battles] == 4)
29
                global.battlegroup = 78;
30
            global.flag[408 progress_hotland_battles] += 1;
31
            if (alldead == 2)
32
                global.battlegroup = 19;
33
            if (alldead == 1)
34
            {
35
                global.flag[224 genocide_hotland] = 1;
36
                global.battlegroup = 19;
37
                alldead = 2;
38
            }
39
            else
40
            {
41
                instance_create(0, 0, obj_battleblcon);
42
                if (desto == 1)
43
                    instance_destroy();
44
            }
45
        }
46
    }
47
    else
48
    {
49
        steps = 0;
50
    }
51
}