-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUltra Hand.wep.gml
More file actions
199 lines (180 loc) · 5.68 KB
/
Ultra Hand.wep.gml
File metadata and controls
199 lines (180 loc) · 5.68 KB
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
#define init
global.smacker = sprite_add_weapon("sprites/weapons/sprUltraHand.png",-6,5)
global.smackerOff = sprite_add_weapon("sprites/weapons/sprUltraHandOff.png",-6,5)
#define weapon_name
return "ULTRA HAND"
#define weapon_type
return 0
#define weapon_cost
return 0
#define weapon_area
return 24
#define weapon_load
return 12
#define weapon_swap
return sndSwapHammer
#define weapon_auto
return 0
#define weapon_melee
return 1
#define weapon_laser_sight
return 0
#define weapon_reloaded
#define weapon_rads
return 28
#define weapon_fire
var _p = random_range(.8,1.2)
sound_play_pitchvol(sndLaserUpg,4*_p,.7)
sound_play_pitchvol(sndWaveGun,2*_p,.7)
sound_play_pitch(sndAssassinAttack,2*_p)
with instance_create(x,y,CustomObject){
team = other.team
creator = other
depth = other.depth - 1
name = "Ultra Hand"
image_speed = 0
flip = -sign(other.wepangle)
image_yscale = -other.wepflip
sprite_index = global.smacker
rotspeed = 240/3
trailcount = 6
counter = 0
image_angle = other.gunangle + other.wepangle
length = sprite_width - sprite_xoffset + 20*skill_get(mut_long_arms)
trailx = x + lengthdir_x(length, image_angle)// + other.hspeed_raw
traily = y + lengthdir_y(length, image_angle)// + other.vspeed_raw
on_step = hand_step
}
with instance_create(x - lengthdir_x(12*skill_get(mut_long_arms), gunangle),y - lengthdir_y(12*skill_get(mut_long_arms), gunangle),CustomSlash){
team = other.team
creator = other
depth = other.depth - 1
name = "Ultra Hand Slash"
damage = 30
image_speed = .4
//sprite_index = sprSlash
flip = -sign(other.wepangle)
mask_index = mskSlash
//sprite_index = mskSlash
image_xscale = .5
image_yscale = .7
if skill_get(mut_long_arms){
image_xscale = 1.2
image_yscale = 1.4
}
image_angle = other.gunangle
on_hit = hand_hit
on_projectile = hand_proj
on_grenade = hand_grenade
on_anim = nothing
}
wepangle *= -1
#define nothing
instance_destroy()
#define hand_grenade
with other{
team = other.team
motion_set(other.image_angle, speed)
image_angle = direction
}
#define hand_proj
with other if typ > 0{
//if typ = 1{
team = other.team
motion_set(other.image_angle, speed)
image_angle = direction
//}
//else instance_destroy()
}
if instance_is(other, EnemyLaser){
with other{
team = other.team
x = other.x
y = other.y
xstart = x
ystart = y
image_xscale = 0
image_angle = other.image_angle
event_perform(ev_alarm,0)
sprite_index = sprLaser
}
}
#define hand_step
//var xlen = 0, ylen = 0
counter += rotspeed * current_time_scale * flip
if instance_exists(creator){
x = creator.x + creator.hspeed_raw
y = creator.y + creator.vspeed_raw
//xlen = creator.hspeed_raw
//ylen = creator.vspeed_raw
image_angle += rotspeed * current_time_scale * flip
}
if abs(counter) > 240 instance_destroy()
else {
var ang = image_angle - (rotspeed * current_time_scale * flip)
for (var i = 0; i < trailcount; i++){
ang += (rotspeed * current_time_scale * flip)/trailcount
//with instance_create(x + lengthdir_x(length, ang) + xlen*i/trailcount, y + lengthdir_y(length, ang) + ylen*i/trailcount, BoltTrail){
with instance_create(xstart + lengthdir_x(length, ang), ystart + lengthdir_y(length, ang), BoltTrail){
image_xscale = point_distance(x, y, other.trailx, other.traily)
image_angle = point_direction(x, y, other.trailx, other.traily)
other.trailx = x
other.traily = y
if random(100)<((12+skill_get(mut_long_arms)*3)*current_time_scale) with instance_create(x+random_range(-3,3),y+random_range(-3,3),Wind)
{
sprite_index = sprEatRad
if !irandom(4) sprite_index = sprEatBigRad
}
image_blend = c_yellow
if fork(){
while instance_exists(self){
image_yscale -= .05 * current_time_scale
image_blend = merge_color(image_blend, c_green, current_time_scale/10)
wait(0)
}
exit
}
}
}
}
#define hand_hit
if projectile_canhit_melee(other){
var p = random_range(.8,1.2)
sound_play_pitch(sndHammerHeadProc,.6*p)
sound_play_pitch(sndBasicUltra,2*p)
sound_play_pitch(sndCoopUltraA,4.3*p)
sleep(200)
sound_play_gun(sndClickBack,1,.6)
sound_stop(sndClickBack)
view_shake_at(x,y,70)
projectile_hit(other, damage, 1000, image_angle)
var _x = x, _y = y, dir = image_angle - 90 * flip, leng = 90, dirfac = 11*flip, t = team;
if fork(){
repeat(6){
repeat(6){
var l = random(leng) + 16, lx = lengthdir_x(l, dir), ly = lengthdir_y(l, dir)
with instance_create(_x + lx, _y + ly, UltraShell){
motion_set(dir + 90 * sign(dirfac), 10)
sound_play_hit(sndShotgun,.1)
typ = 0
team = t
if !place_meeting(x,y,Floor) || place_meeting(x,y,Wall) instance_delete(self)
}
dir += (dirfac)/2
}
wait(1)
}
exit
}
}
#define weapon_sprt_hud
return global.smacker
#define weapon_sprt
if instance_is(self,Player) if array_length(instances_matching(instances_matching(CustomObject, "name", "Ultra Hand"), "creator", id)) return mskNone
if GameCont.rad >= weapon_rads() return global.smacker else return global.smackerOff
#define nts_weapon_examine
return{
"d": "The proper gloves allows for easy rad manipulation. ",
}
#define weapon_text
return "THE POWER OF INFINITY"