Undertale script viewer

← back to main script listing

gml_Object_obj_pollener_Draw_0

(view raw script w/o annotations or w/e)
1
draw_set_circle_precision(0);
2
draw_set_color(c_yellow);
3
for (i = 0; i < 100; i += 1)
4
{
5
    pollenalpha[i] += 0.03;
6
    truepollenalpha[i] = pollenalpha[i];
7
    if (pollenalpha[i] >= 2)
8
        truepollenalpha[i] = 4 - pollenalpha[i];
9
    pollenx[i] += (pollenhspeed[i] * truepollenalpha[i]) / 4;
10
    polleny[i] += (pollenvspeed[i] * truepollenalpha[i]) / 4;
11
    if (truepollenalpha[i] <= 0)
12
    {
13
        pollenx[i] = random(room_width);
14
        polleny[i] = random(room_height);
15
        pollensize[i] = random(3) + 1;
16
        pollenhspeed[i] = random(2) - 1;
17
        pollenvspeed[i] = random(2) - 1;
18
        pollenalpha[i] = 0;
19
    }
20
    draw_set_alpha(truepollenalpha[i]);
21
    draw_circle(pollenx[i], polleny[i], pollensize[i], 0);
22
}
23
draw_set_alpha(1);