Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_shot_medium_fake_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
var shoot_sound = snd_ceroba_staff_lock
4
switch player_weapon
5
{
6
    case "Toy Gun":
7
    case "Wild Revolver":
8
        switch player_weapon_modifier
9
        {
10
            case "Pebble Ammo":
11
                shoot_sound = audio_play_sound(snd_shotmid_pebbles, 20, false)
12
                sprite_index = spr_shot_medium_pebbles
13
                image_speed = 0.48333333333333334
14
                break
15
            case "Cff Bean Ammo":
16
                shoot_sound = audio_play_sound(snd_shotmid_coffee, 20, false)
17
                sprite_index = spr_shot_medium_coffee
18
                image_speed = 0.48333333333333334
19
                break
20
            case "Glass Ammo":
21
                shoot_sound = audio_play_sound(snd_shotmid_glass, 20, false)
22
                sprite_index = spr_shot_medium_glass
23
                image_xscale = 2
24
                image_yscale = 2
25
                image_speed = 0.48333333333333334
26
                break
27
            case "Silver Ammo":
28
                shoot_sound = audio_play_sound(snd_shotmid_silver, 20, false)
29
                sprite_index = spr_shot_medium_silver
30
                image_speed = 0.48333333333333334
31
                break
32
            case "Nails":
33
                shoot_sound = audio_play_sound(snd_shotmid_nails, 20, false)
34
                sprite_index = spr_shot_medium_nails
35
                image_speed = 1
36
                break
37
            case "Friendliness Pellets":
38
                shoot_sound = audio_play_sound(snd_shotmid_pellets, 20, false)
39
                sprite_index = spr_shot_medium_pellets
40
                image_speed = 1
41
                break
42
            case "Ice Pellets":
43
                shoot_sound = audio_play_sound(snd_shotmid_ice, 20, false)
44
                sprite_index = spr_shot_medium_ice
45
                image_speed = 0.48333333333333334
46
                break
47
            case "Flint":
48
                shoot_sound = audio_play_sound(snd_shotmid_flint, 20, false)
49
                sprite_index = spr_shot_medium_flint
50
                image_speed = 0.48333333333333334
51
                break
52
            default:
53
                shoot_sound = audio_play_sound(snd_shotmid, 20, false)
54
                image_speed = 0.26666666666666666
55
        }
56
57
        break
58
}
59
60
image_index = 0
61
audio_sound_gain(shoot_sound, 1.5, 0)