-
Notifications
You must be signed in to change notification settings - Fork 1
/
Phlogenitator.wep.gml
141 lines (122 loc) · 3.71 KB
/
Phlogenitator.wep.gml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#define init
global.sprPhlogenitator = sprite_add_weapon("sprites/weapons/sprPhlogenitator.png", 4, 4);
global.sprPhlogenitatorAnim = sprite_add("sprites/weapons/sprPhlogenitatorAnim.png", 11, 4, 6);
global.sprFatty = sprite_add("sprites/other/sprFatShell.png",1,3,5)
global.sprSuperFatty = sprite_add("sprites/other/sprFatShellUpg.png",1,3,5)
global.animarray = []
wait(3)
for var i = 0; i < 11; i++{
array_push(global.animarray, sprite_duplicate_ext(global.sprPhlogenitatorAnim, i, 1))
}
wait(60)
global.animarray = []
for var i = 0; i < 11; i++{
array_push(global.animarray, sprite_duplicate_ext(global.sprPhlogenitatorAnim, i, 1))
}
#define weapon_name
return "PHLOGENITATOR"
#define weapon_sprt_hud
return global.sprPhlogenitator
#define weapon_sprt(w)
if instance_is(self,Player){
if is_object(w){
var q = lq_defget(w, "anim_index", 0)
if q > 0 return global.animarray[floor(q)]
}
}
return global.sprPhlogenitator;
#define weapon_type
return 2;
#define weapon_auto
return false;
#define weapon_load
return 50;
#define weapon_cost
return 16;
#define weapon_swap
return sndSwapExplosive;
#define weapon_area
return 15;
#define weapon_reloaded(p)
sound_play(sndShotReload)
if p wkick = -1
else bwkick = -1
#define nts_weapon_examine
return{
"d": "Superheated projectiles melt through thick armor like butter. ",
}
#define weapon_text
return "BURNING COMETS";
#define weapon_fire(w)
if !is_object(w){
w = {
wep : mod_current,
anim_index : 0,
image_speed : 0,
shell : 0
}
wep = w
}
w.anim_index = 0
w.image_speed = .4
w.shell = 1
if fork(){
var ang = gunangle + 180;
repeat(4){
if instance_exists(self){
motion_set(ang,4)
wait(1)
}
}
exit
}
var _p = random_range(.9, 1.2)
sound_play_pitch(sndMachinegun,1 * _p)
sound_play_pitch(sndCrossbow,1 * _p)
sound_play_pitch(sndShotgun,1 * _p)
sound_play_pitch(sndSuperFlakCannon,.7 * _p)
sound_play_pitch(sndIncinerator,.8 * _p)
sound_play_pitch(sndFlameCannonEnd,.6 * _p)
weapon_post(8,-90,76)
repeat(6){
with mod_script_call_self("mod", "defpack tools 2", "create_flameshell_flak", x, y){
motion_set(other.gunangle + random_range(-40, 40) * other.accuracy, 12)
projectile_init(other.team,other)
image_angle = direction
accuracy = other.accuracy
}
}
#define step(p)
if p goodstep(wep, 1, interfacepop)
else if race == "steroids" goodstep(bwep, -1, binterfacepop)
#define goodstep(w, f, n)
if is_object(w) and lq_defget(w, "image_speed", 0) > 0{
w.anim_index += w.image_speed * current_time_scale
if w.shell and floor(w.anim_index) == 7{
w.shell = 0
sound_play_pitchvol(sndGrenadeShotgun, 2.5*random_range(.9, 1.2), .8)
if f wkick = 2
else bwkick = 2
repeat(n) with instance_create(x,y,Shell){
move_contact_solid(other.gunangle, 16)
motion_set(other.gunangle+random_range(-20, 20) + 90*other.right*f,random_range(6,9))
image_angle = direction + 90
friction *= 2.5
sprite_index = skill_get(mut_shotgun_shoulders) > 0 ? global.sprSuperFatty : global.sprFatty
repeat(8){
with instance_create(x, y, Smoke){
motion_set(other.direction + random_range(-30, 30), random(3) + 1)
image_xscale /= 2
image_yscale /= 2
}
}
}
}
if w.anim_index + w.image_speed * current_time_scale >= sprite_get_number(global.sprPhlogenitatorAnim){
if f wkick = -2
else bwkick = -2
sound_play_pitchvol(sndSwapPistol, 2*random_range(.9,1.2), .8)
w.image_speed = 0
w.anim_index = 0
}
}