Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_tm_whip_attack_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    init = 1;
4
    animator.damage = damage;
5
    animator.target = target;
6
    animator.animSpeed = animSpeed;
7
    animator.creator = creator;
8
    if (!quizmode)
9
        animator.difficulty = difficulty;
10
}
11
attacktimer += animSpeed;
12
if (state == 0 && attacktimer >= 20)
13
{
14
    if (global.turntimer > 30)
15
    {
16
        state = 1;
17
        animator.state = 1;
18
    }
19
    else
20
    {
21
        attacktimer = 19;
22
    }
23
}
24
if (state == 1 && attacktimer >= 35)
25
{
26
    state = 2;
27
    animator.state = 2;
28
    animator.zapping = true;
29
}
30
if (state == 2 && attacktimer > 55)
31
{
32
    animator.state = 3;
33
    state = 3;
34
}
35
if (attacktimer >= 65)
36
{
37
    state = 0;
38
    attacktimer = 5;
39
}