Deltarune (Chapter 3) 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
    active = 1;
6
    timer++;
7
    if (timer == 2 && attacked == 0)
8
    {
9
        
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(180);
10
        if (!instance_exists(myspawner) && instance_exists(obj_heart))
11
        {
12
            global.monsterattackname[myself] = "ThisAttack" + string(spawntype);
13
            myspawner = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
14
            myspawner.type = spawntype;
15
            myspawner.damage = 10;
16
            myspawner.difficulty = global.tempflag[27];
17
        }
18
        attacked = 1;
19
    }
20
}
21
else
22
{
23
    image_alpha = 0.25;
24
    image_speed = 0;
25
    active = 0;
26
}
27
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"))
28
{
29
    timer = 0;
30
    attacked = 0;
31
}