Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_mike_grabcat_pluey_Create_0

(view raw script w/o annotations or w/e)
1
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; }
();
2
event_inherited();
3
image_alpha = 1;
4
if (!instance_exists(obj_heart))
5
    instance_destroy();
6
max_vspeed = 6;
7
wall_destroy = 0;
8
col = 16776960;
9
walks = false;
10
image_blend = col;
11
anchorx = xstart + 160;
12
lastaction = 0;
13
israin = false;
14
is_launched = false;
15
action = 0;
16
grabbable = 1;
17
device = -1;
18
tough = 0;
19
for (var i = 0; i < 5; i++)
20
{
21
    last_x[i] = 0;
22
    last_y[i] = 0;
23
}
24
last_x[0] = x;
25
last_y[0] = y - 4;
26
if (x < (camerax() + (camerawidth() / 2)))
27
    side = 1;
28
else
29
    side = -1;
30
hspeed = side * irandom_range(2, 5);
31
image_speed = abs(speed) * 0.33;
32
wait = 0;
33
xx = x;
34
yy = y;
35
xscale = side;
36
idle_timer = 0;
37
image_xscale = 1;
38
image_yscale = image_xscale;
39
canmerge = false;
40
alarm[0]
 = irandom_range(120, 320);
gml_Object_obj_mike_grabcat_pluey_Alarm_0.gml

if (point_distance(x, 0, camerax() + (camerawidth() / 2), 0) < 100) { if (action == 0) { hspeed = 0; friction = 0.25; action = 2; } } else { alarm[0]
 = 1;
}