Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_bigfrog_frog_tongue_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
grow_speed_current += (sign(grow_speed_target - grow_speed_current) * 1);
4
current_length += grow_speed_current;
5
if (current_length >= target_length && target_length != 0)
6
{
7
    target_length = 0;
8
    grow_speed_target *= -1;
9
}
10
if (current_length <= 1)
11
    spawner.image_speed = -1;
12
if (current_length <= 0)
13
{
14
    instance_destroy(tongue_tip);
15
    instance_destroy();
16
    exit;
17
}
18
image_xscale = current_length;
19
image_yscale = 1;
20
tongue_tip.x = x + lengthdir_x(image_xscale, direction);
21
tongue_tip.y = y + lengthdir_y(image_xscale, direction);
22
image_angle = direction;
23
tongue_tip.image_angle = image_angle;