Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_bullettester_enemy_Step_0

(view raw script w/o annotations or w/e)
1
if (global.monster[myself] == 1)
2
{
3
    image_speed = 0.15;
4
    image_alpha = 1;
5
    timer += 1;
6
    if (timer == 15 && attacked == 0)
7
    {
8
        global.turntimer = 180;
9
        if (!i_ex(myspawner) && instance_exists(obj_heart))
10
        {
11
            global.monsterattackname[myself] = "ThisAttack" + string(spawntype);
12
            myspawner = scr_bulletspawner
scr_bulletspawner

function scr_bulletspawner(arg0, arg1, arg2) { __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
13
            myspawner.type = spawntype;
14
            myspawner.damage = 10;
15
            myspawner.difficulty = global.tempflag[27];
16
        }
17
        attacked = 1;
18
    }
19
}
20
else
21
{
22
    image_alpha = 0.5;
23
    image_speed = 0;
24
}
25
if (!scr_isphase
scr_isphase

function scr_isphase(arg0) { __isphase = 0; if (arg0 == "menu" && global.myfight == 0) __isphase = 1; if (arg0 == "acting" && global.myfight == 3) __isphase = 1; if (arg0 == "victory" && global.myfight == 7) __isphase = 1; if (arg0 == "attack" || arg0 == "fight") { if (global.myfight == 1) __isphase = 1; } if (arg0 == "spell" || arg0 == "item") { if (global.myfight == 4) __isphase = 1; } if (arg0 == "enemytalk" || arg0 == "balloon") { if (global.mnfight == 1) __isphase = 1; } if (arg0 == "enemyattack" || arg0 == "bullets") { if (global.mnfight == 2) __isphase = 1; } return __isphase; }
("bullets"))
26
{
27
    timer = 0;
28
    attacked = 0;
29
}