Deltarune 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
        attacktimer = 19
21
}
22
if (state == 1 && attacktimer >= 35)
23
{
24
    state = 2
25
    animator.state = 2
26
    animator.zapping = true
27
}
28
if (state == 2 && attacktimer > 55)
29
{
30
    animator.state = 3
31
    state = 3
32
}
33
if (attacktimer >= 65)
34
{
35
    state = 0
36
    attacktimer = 5
37
}