Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_spamton_dollar_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
if (!instance_exists(obj_spamton_attack_mode))
3
    exit;
4
if (obj_spamton_attack_mode.state == 2)
5
{
6
    if (x > ((obj_spamton_attack_mode.x + obj_spamton_attack_mode.mouthx) - 50))
7
        y += clamp((obj_spamton_attack_mode.y + obj_spamton_attack_mode.mouthy) - y, -5, 5);
8
    if (x < ((obj_spamton_attack_mode.x + obj_spamton_attack_mode.mouthx) - 10))
9
    {
10
        direction = point_direction(x, y, obj_spamton_attack_mode.x + obj_spamton_attack_mode.mouthx, obj_spamton_attack_mode.y + obj_spamton_attack_mode.mouthy);
11
        friction = -0.1;
12
    }
13
}
14
else
15
{
16
    friction = 0;
17
}