Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_starlo_bell_Step_0

(view raw script w/o annotations or w/e)
1
bell_attack_current_swing_degree += 6;
2
if (bell_attack_current_swing_degree >= 360)
3
    bell_attack_current_swing_degree -= 360;
4
var sinpos = dsin(bell_attack_current_swing_degree);
5
bell_attack_current_swing_angle = sinpos * bell_attack_max_swing_angle;
6
image_angle = 0 + bell_attack_current_swing_angle;
7
if (image_alpha < 1)
8
    exit;
9
if (sinpos >= 0.95 && bell_swing_noloop != 1)
10
{
11
    instance_create(x, bbox_bottom + 10, obj_battle_enemy_attack_starlo_bell_wave_blue);
12
    var snd = audio_play_sound(snd_big_bell_ring, 1, 0);
13
    audio_sound_pitch(snd, 1.1);
14
    bell_swing_noloop = 1;
15
}
16
else if (sinpos <= -0.95 && bell_swing_noloop != -1)
17
{
18
    instance_create(x, bbox_bottom + 10, obj_battle_enemy_attack_starlo_bell_wave_orange);
19
    var snd = audio_play_sound(snd_big_bell_ring, 1, 0);
20
    audio_sound_pitch(snd, 0.9);
21
    bell_swing_noloop = -1;
22
}