Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_shot_weak_Create_0

(view raw script w/o annotations or w/e)
1
var player_weapon = global.player_weapon
2
var player_weapon_modifier = global.player_weapon_modifier
3
switch player_weapon
4
{
5
    case "Toy Gun":
6
    case "Wild Revolver":
7
        switch player_weapon_modifier
8
        {
9
            case "Pebble Ammo":
10
                var shoot_sound = audio_play_sound(snd_shotweak_pebbles, 20, false)
11
                sprite_index = spr_shot_weak_pebbles
12
                image_speed = 0.48333333333333334
13
                break
14
            case "Cff Bean Ammo":
15
                shoot_sound = audio_play_sound(snd_shotweak_coffee, 20, false)
16
                sprite_index = spr_shot_weak_coffee
17
                image_speed = (1/3)
18
                break
19
            case "Glass Ammo":
20
                shoot_sound = audio_play_sound(snd_shotweak_glass, 20, false)
21
                sprite_index = spr_shot_weak_glass
22
                image_xscale = 2
23
                image_yscale = 2
24
                image_speed = (1/3)
25
                break
26
            case "Silver Ammo":
27
                shoot_sound = audio_play_sound(snd_shotweak_silver, 20, false)
28
                sprite_index = spr_shot_weak_silver
29
                image_speed = 0.48333333333333334
30
                break
31
            case "Nails":
32
                shoot_sound = audio_play_sound(snd_shotweak_nails, 20, false)
33
                sprite_index = spr_shot_weak_nails
34
                image_speed = 1
35
                break
36
            case "Friendliness Pellets":
37
                shoot_sound = audio_play_sound(snd_shotweak_pellets, 20, false)
38
                sprite_index = spr_shot_weak_pellets
39
                image_speed = 1
40
                break
41
            case "Ice Pellets":
42
                shoot_sound = audio_play_sound(snd_shotweak_ice, 20, false)
43
                sprite_index = spr_shot_weak_ice
44
                image_speed = 0.48333333333333334
45
                break
46
            case "Flint":
47
                shoot_sound = audio_play_sound(snd_shotweak_flint, 20, false)
48
                sprite_index = spr_shot_weak_flint
49
                image_speed = 0.48333333333333334
50
                break
51
            default:
52
                shoot_sound = audio_play_sound(snd_shotweak, 20, false)
53
                image_speed = 0.26666666666666666
54
        }
55
56
        break
57
}
58
59
image_index = 0
60
audio_sound_gain(shoot_sound, 1.5, 0)