Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_spamtonshot_Create_0

(view raw script w/o annotations or w/e)
1
if (instance_exists(obj_sneo_heartattack) && obj_sneo_heartattack.heart_health < 1)
2
{
3
    instance_destroy();
4
    exit;
5
}
6
scr_bullet_init
scr_bullet_init

function
scr_bullet_init()
{ grazed = 0; grazetimer = 0; destroyonhit = 1; target = 0; inv = 60; damage = 10; element = 0; grazepoints = 1; timepoints = 1; active = 1; updateimageangle = 0; }
();
7
element = 6;
8
f = 2;
9
con = 0;
10
mode = 1;
11
dontexplode = 0;
12
destroyable = 0;
13
image_xscale = 1;
14
image_yscale = 1;
15
siner = 0;
16
fluffyguarddestroysthis = 0;
17
targetx = camerax() + (camerawidth() / 2);
18
targety = cameray() + (cameraheight() / 4);
19
if (instance_exists(obj_heart))
20
{
21
    targetx = obj_heart.x;
22
    targety = obj_heart.y;
23
}
24
move_towards_point(targetx, targety, 5);
25
angle_speed = 0;
26
grazepoints = 4;
27
if (instance_exists(obj_sneo_bulletcontroller))
28
    target = obj_sneo_bulletcontroller.target;