Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_carouselbullet_Step_0

(view raw script w/o annotations or w/e)
1
if (t <= 25)
2
    image_alpha += 0.04;
3
if (t == 25)
4
    active = 1;
5
if (t == 0)
6
{
7
    maxspeed = abs(hspeed);
8
    hspeed = 0;
9
}
10
t += 1;
11
siner += sinspeed;
12
sinfactor_0 = sin((siner - 1) / 20);
13
sinfactor = sin(siner / 20);
14
sinsign = sinfactor - sinfactor_0;
15
x = obj_battlesolid.x - (sinfactor * 150);
16
image_xscale = sinsign * 50;
17
if (image_xscale > 2)
18
    image_xscale = 2;
19
if (image_xscale < -2)
20
    image_xscale = -2;
21
if (sinsign > 0)
22
{
23
    depth = 21;
24
    active = 0;
25
    image_blend = c_gray;
26
}
27
if (sinsign < 0)
28
{
29
    depth = 0;
30
    if (image_alpha >= 1)
31
        active = 1;
32
    image_blend = c_white;
33
}
34
vsin += 1;
35
if (altmode == 0 || altmode == 2 || altmode == 3)
36
    y += (sin(vsin / 10) * 3.5);
37
if (altmode == 1)
38
    y -= (sin(vsin / 10) * 3.5);
39
if (altmode == 99)
40
{
41
    altsin += 1;
42
    y += (cos(altsin / 20) * 2);
43
}
44
if (altmode == 99)
45
{
46
    altsin += 1;
47
    y += (cos(altsin / 10) * 2);
48
}