Deltarune (Chapter 2) script viewer

← back to main script listing

gml_GlobalScript_scr_tb_make

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

function
scr_tb_make(arg0, arg1, arg2, arg3, arg4)
{ var _mytbullet = instance_create(x, y - arg0, obj_teacup_bullet); with (_mytbullet) { spin = arg1; spinrate = arg2; hitType = arg3; master = other.id; if (hitType == 1) { colClose = c_fuchsia; colFar = c_blue; image_blend = c_fuchsia; } if (hitType == 2) { colClose = c_lime; colFar = c_blue; image_blend = c_lime; } if (hitType == 3) { colClose = #4040FF; colFar = c_navy; image_blend = colClose; } if (hitType == 5) { image_blend = #7F553F; colClose = image_blend; colFar = image_blend; } if (hitType == 4) { sprite_index = spr_teacup_bullet_big; bulletCollisionAngle = 20; } lineToCenter = arg4; if (hitType == 3 || hitType == 5) lineToCenter = false; if (hitType == 1 || hitType == 2) { sprite_index = spr_teacup_bullet_good; groundForgiveness = 1; bulletCollisionAngle = 28; bulletHitHeight = 80; } spriteWidthRoot = sprite_get_width(sprite_index); spriteHeightRoot = sprite_get_width(sprite_index); } return _mytbullet; }
(arg0, arg1, arg2, arg3, arg4)
2
{
3
    var _mytbullet = instance_create(x, y - arg0, obj_teacup_bullet);
4
    with (_mytbullet)
5
    {
6
        spin = arg1;
7
        spinrate = arg2;
8
        hitType = arg3;
9
        master = other.id;
10
        if (hitType == 1)
11
        {
12
            colClose = c_fuchsia;
13
            colFar = c_blue;
14
            image_blend = c_fuchsia;
15
        }
16
        if (hitType == 2)
17
        {
18
            colClose = c_lime;
19
            colFar = c_blue;
20
            image_blend = c_lime;
21
        }
22
        if (hitType == 3)
23
        {
24
            colClose = #4040FF;
25
            colFar = c_navy;
26
            image_blend = colClose;
27
        }
28
        if (hitType == 5)
29
        {
30
            image_blend = #7F553F;
31
            colClose = image_blend;
32
            colFar = image_blend;
33
        }
34
        if (hitType == 4)
35
        {
36
            sprite_index = spr_teacup_bullet_big;
37
            bulletCollisionAngle = 20;
38
        }
39
        lineToCenter = arg4;
40
        if (hitType == 3 || hitType == 5)
41
            lineToCenter = false;
42
        if (hitType == 1 || hitType == 2)
43
        {
44
            sprite_index = spr_teacup_bullet_good;
45
            groundForgiveness = 1;
46
            bulletCollisionAngle = 28;
47
            bulletHitHeight = 80;
48
        }
49
        spriteWidthRoot = sprite_get_width(sprite_index);
50
        spriteHeightRoot = sprite_get_width(sprite_index);
51
    }
52
    return _mytbullet;
53
}