1
00:00:00,000 --> 00:00:03,950
Welcome back, My favorite game developers.

2
00:00:03,945 --> 00:00:07,745
In this video, we've created an extra set of weapons.

3
00:00:07,740 --> 00:00:09,320
We've created a rifle,

4
00:00:09,315 --> 00:00:10,955
and we've created a pistol.

5
00:00:10,950 --> 00:00:12,710
So now when we run the game,

6
00:00:12,705 --> 00:00:15,275
we are not only limited to the shotgun,

7
00:00:15,270 --> 00:00:17,190
but we can also find a pistol.

8
00:00:17,190 --> 00:00:20,430
Obviously the bullets are also different.

9
00:00:20,430 --> 00:00:22,300
The firing rate is different.

10
00:00:22,300 --> 00:00:24,320
The, even the damage that

11
00:00:24,320 --> 00:00:25,580
the bullets deal and

12
00:00:25,580 --> 00:00:27,490
the speed of each bullet is different.

13
00:00:27,485 --> 00:00:28,765
So as you can see right here,

14
00:00:28,760 --> 00:00:30,520
I can turn on the rifle,

15
00:00:30,515 --> 00:00:32,495
turn off the pistol, run.

16
00:00:32,495 --> 00:00:35,125
Oops. So that was a huge mistake.

17
00:00:35,120 --> 00:00:37,940
Sorry for that. And turn off the pistol,

18
00:00:37,940 --> 00:00:39,340
turn on the rifle,

19
00:00:39,335 --> 00:00:40,615
and I can start shooting.

20
00:00:40,610 --> 00:00:42,350
And as you can see, the bullets of

21
00:00:42,350 --> 00:00:44,560
the rifle or a bit faster,

22
00:00:44,555 --> 00:00:48,935
they are a bit greener and let's not waste any more time.

23
00:00:48,935 --> 00:00:51,775
And let's get started.

24
00:00:51,770 --> 00:00:53,690
Oh, case.

25
00:00:53,690 --> 00:00:58,430
So Nile, It's time to add a couple of more weapons.

26
00:00:58,430 --> 00:01:01,310
How are we going to do this?

27
00:01:01,310 --> 00:01:04,580
So we already have the prefab for the shotgun.

28
00:01:04,579 --> 00:01:06,639
So I'm going to go into

29
00:01:06,635 --> 00:01:08,815
the prefrontal so we don't

30
00:01:08,810 --> 00:01:11,570
have a prefab for the shotgun specifically,

31
00:01:11,570 --> 00:01:16,060
we only have for the doomed player which has a shop.

32
00:01:16,055 --> 00:01:18,625
So I'm going to create a new folder in here,

33
00:01:18,620 --> 00:01:22,430
which is going to be called the weapons.

34
00:01:22,430 --> 00:01:26,000
And I'm going to drag the shotgun in here.

35
00:01:26,000 --> 00:01:28,880
Okay, so we need to open the prefab. There we go.

36
00:01:28,880 --> 00:01:34,320
So now we can double-click and the drag and the shotgun.

37
00:01:34,324 --> 00:01:36,684
So now we have a shotgun as

38
00:01:36,680 --> 00:01:39,530
a prefab separately from the deuterium.

39
00:01:39,530 --> 00:01:43,490
And you can see how the Square became a bit more blue.

40
00:01:43,490 --> 00:01:46,310
Now I can add the shotgun and here and we have

41
00:01:46,310 --> 00:01:48,700
the weapon that we are going to

42
00:01:48,695 --> 00:01:51,635
adjust and create something different front.

43
00:01:51,635 --> 00:01:53,845
So first things first,

44
00:01:53,840 --> 00:01:55,490
we'll need to change this pride.

45
00:01:55,490 --> 00:02:00,010
So let's go into the Whereas the sprites that we add,

46
00:02:00,005 --> 00:02:01,895
all of the weapons or blood,

47
00:02:01,895 --> 00:02:04,615
bullets, enemies, player tile guns.

48
00:02:04,610 --> 00:02:06,430
Okay, so we only have one gun.

49
00:02:06,425 --> 00:02:08,635
Let's go to the Resources 0 case.

50
00:02:08,630 --> 00:02:10,660
So let's see what we have in here.

51
00:02:10,655 --> 00:02:13,505
As you can see, I've provided you with a lot of things.

52
00:02:13,505 --> 00:02:17,615
One of them is the animation for different kinds of gun.

53
00:02:17,615 --> 00:02:18,805
And you can see we also have

54
00:02:18,800 --> 00:02:20,590
the muzzle fire, muzzle smoke.

55
00:02:20,585 --> 00:02:23,815
I recommended to try to add all of these.

56
00:02:23,810 --> 00:02:26,360
We might also do this in a bit,

57
00:02:26,360 --> 00:02:29,180
but for now we want to just have the basic concept.

58
00:02:29,180 --> 00:02:33,020
We are not very looking into how pretty the,

59
00:02:33,020 --> 00:02:34,760
the shooting is, although it is

60
00:02:34,760 --> 00:02:36,500
important when it comes to a game.

61
00:02:36,500 --> 00:02:39,610
But anyways, we have this rifle right here,

62
00:02:39,605 --> 00:02:41,395
we have this sniper,

63
00:02:41,390 --> 00:02:43,270
and we also have the little gun.

64
00:02:43,265 --> 00:02:46,375
So I'm going to select all three and I'm going to

65
00:02:46,370 --> 00:02:50,320
drag them into the guns sprite and add them.

66
00:02:50,315 --> 00:02:52,465
Okay, great. Now that we have the shotgun,

67
00:02:52,460 --> 00:02:56,090
let's rename it to the rifle.

68
00:02:56,085 --> 00:02:58,065
A rifle.

69
00:02:58,060 --> 00:02:59,770
And if I open it up,

70
00:02:59,770 --> 00:03:01,740
you can see the fire point right here.

71
00:03:01,735 --> 00:03:02,985
But before we do that,

72
00:03:02,980 --> 00:03:04,680
we want to change this pride.

73
00:03:04,675 --> 00:03:08,055
And for the rifle you can see that it's very small,

74
00:03:08,050 --> 00:03:10,290
so we made them 42.

75
00:03:10,285 --> 00:03:12,925
Let's select these and make them all

76
00:03:12,925 --> 00:03:15,565
40 to apply the changes.

77
00:03:15,565 --> 00:03:17,425
There we go, we have our rifle.

78
00:03:17,425 --> 00:03:20,565
Now because of the coloring of the background,

79
00:03:20,560 --> 00:03:21,850
you can see the rifle isn't

80
00:03:21,850 --> 00:03:23,940
that prevalent, Let's call that.

81
00:03:23,935 --> 00:03:26,055
It's not that good looking,

82
00:03:26,050 --> 00:03:27,880
but let's not worry about that as

83
00:03:27,880 --> 00:03:30,060
long as there and once it's on the PLR,

84
00:03:30,055 --> 00:03:32,145
I'm sure it will look a bit better.

85
00:03:32,140 --> 00:03:34,660
So anyways, let's continue one,

86
00:03:34,660 --> 00:03:36,760
What else do we have defined between shots,

87
00:03:36,760 --> 00:03:40,640
obviously, for a rifle and it's not a rifle,

88
00:03:40,640 --> 00:03:42,830
it's an assault rifle, so it's automatic.

89
00:03:42,830 --> 00:03:44,320
It's going to be a lot less.

90
00:03:44,315 --> 00:03:47,255
So I'm going to make it around 0.3.

91
00:03:47,255 --> 00:03:50,785
And let's see, the firing point obviously needs

92
00:03:50,780 --> 00:03:54,130
to change so you can see where the muscle is right now.

93
00:03:54,125 --> 00:03:56,935
I'm going to move it right here.

94
00:03:56,930 --> 00:03:58,700
And what else do we have?

95
00:03:58,700 --> 00:04:00,740
If I click on the rifle?

96
00:04:00,740 --> 00:04:03,550
There we go, we can see everything is good.

97
00:04:03,545 --> 00:04:05,585
What else do we need to change?

98
00:04:05,584 --> 00:04:08,574
Oh, we also want to change the bullet

99
00:04:08,570 --> 00:04:10,130
that it fires so we don't want to

100
00:04:10,130 --> 00:04:12,040
have the same bullet as the shotgun.

101
00:04:12,035 --> 00:04:15,895
And I'm going to go again into the Prefabs,

102
00:04:15,890 --> 00:04:18,330
go to the bullets.

103
00:04:18,334 --> 00:04:21,504
Let's find the, okay,

104
00:04:21,500 --> 00:04:22,670
so the player bullet,

105
00:04:22,670 --> 00:04:25,510
I'm going to change this from player bullet

106
00:04:25,505 --> 00:04:32,515
to shot gun bullet.

107
00:04:32,510 --> 00:04:36,910
And I'm going to go ahead and add in our world.

108
00:04:36,905 --> 00:04:40,235
And I'm going to duplicate the shot gun bullet.

109
00:04:40,235 --> 00:04:45,505
I'm going to call it the rifle bullet.

110
00:04:45,500 --> 00:04:48,550
And this rifle bullet will have almost everything,

111
00:04:48,545 --> 00:04:50,575
has the same may be the speed

112
00:04:50,570 --> 00:04:52,610
should be able to better a bit more.

113
00:04:52,610 --> 00:04:56,420
So let's say the speed is maybe six, I don't know.

114
00:04:56,420 --> 00:04:58,580
The damage amount, maybe should be less.

115
00:04:58,580 --> 00:05:02,090
So for example, let's say the damage amount is five.

116
00:05:02,090 --> 00:05:04,340
And what else do we need to

117
00:05:04,340 --> 00:05:06,430
change in here, maybe the sprite.

118
00:05:06,425 --> 00:05:08,875
So let's look at the bullets price that we have.

119
00:05:08,870 --> 00:05:11,330
We are using currently the 14.

120
00:05:11,330 --> 00:05:16,460
And maybe for a rifle we can use one of the shorter ones.

121
00:05:16,460 --> 00:05:21,020
So let's see, let's use the little green one.

122
00:05:21,020 --> 00:05:22,960
So the little green one,

123
00:05:22,955 --> 00:05:25,075
this is the one we're going to use,

124
00:05:25,070 --> 00:05:26,500
whereas the rifle bullet,

125
00:05:26,495 --> 00:05:28,955
let's add the little green one.

126
00:05:28,955 --> 00:05:29,585
Okay.

127
00:05:29,585 --> 00:05:30,925
So that didn't work.

128
00:05:30,920 --> 00:05:33,110
Why? Because of that did

129
00:05:33,110 --> 00:05:35,740
work but we didn't see the shotgun bullet.

130
00:05:35,735 --> 00:05:38,575
Anyways, let's remove the Republican bullet.

131
00:05:38,570 --> 00:05:40,220
And this will be our rifle bullet.

132
00:05:40,220 --> 00:05:41,270
There we go.

133
00:05:41,270 --> 00:05:43,820
It is a pretty small I

134
00:05:43,820 --> 00:05:47,420
feel was there something also the scale 0.5?

135
00:05:47,420 --> 00:05:48,970
And let's make it one.

136
00:05:48,965 --> 00:05:50,195
Keep it as it is.

137
00:05:50,195 --> 00:05:50,845
Okay, great.

138
00:05:50,840 --> 00:05:54,010
So now we have this rifle bullet.

139
00:05:54,005 --> 00:05:56,605
I'm going to go into the rifle and I'm going

140
00:05:56,600 --> 00:05:59,350
to assign it a shot gun bullet,

141
00:05:59,345 --> 00:06:01,315
but the rifle bullet.

142
00:06:01,310 --> 00:06:02,500
But before I do that,

143
00:06:02,495 --> 00:06:03,865
we need to prefab everything.

144
00:06:03,860 --> 00:06:06,170
So I'm going to go back into the Prefabs,

145
00:06:06,169 --> 00:06:08,829
go to the bullets, and add the bullet.

146
00:06:08,825 --> 00:06:10,075
And it will ask me,

147
00:06:10,070 --> 00:06:11,420
would you like to create

148
00:06:11,420 --> 00:06:14,290
a new or original or variant of the prefab?

149
00:06:14,285 --> 00:06:16,585
If I click two for the prefab variant,

150
00:06:16,580 --> 00:06:17,800
this one will change,

151
00:06:17,795 --> 00:06:20,845
but I'm going to create an original prefab.

152
00:06:20,840 --> 00:06:25,160
I'm also going to go into the Prefabs,

153
00:06:25,159 --> 00:06:27,099
the guns, weapons, where are they?

154
00:06:27,095 --> 00:06:31,015
And I'm going to drag in the rifle also.

155
00:06:31,010 --> 00:06:35,690
So now we have a shotgun and an original rifle.

156
00:06:35,690 --> 00:06:38,740
And in this rifle, instead of using the shotgun bullet,

157
00:06:38,735 --> 00:06:42,385
I'm going to go into that slot this down,

158
00:06:42,380 --> 00:06:46,310
go into the bullets at the rifle bullet,

159
00:06:46,310 --> 00:06:47,690
save all of that.

160
00:06:47,690 --> 00:06:51,890
And finally, we are going to delete the rifle.

161
00:06:51,890 --> 00:06:54,110
Delete the rifle bullet.

162
00:06:54,110 --> 00:06:57,610
All go to the where is it?

163
00:06:57,605 --> 00:06:59,245
Prefabs.

164
00:06:59,240 --> 00:07:01,340
Okay, So weapons, it's the last one.

165
00:07:01,340 --> 00:07:03,650
And I'm going to add the rifle as

166
00:07:03,650 --> 00:07:06,820
the child of the weapons on.

167
00:07:06,815 --> 00:07:11,225
And obviously the rifles position should be set to 0.

168
00:07:11,225 --> 00:07:14,545
Now let's try this again one more time.

169
00:07:14,540 --> 00:07:16,880
Again, we add the rifle as the weapons are,

170
00:07:16,880 --> 00:07:20,860
and we will turn off the shotgun.

171
00:07:20,855 --> 00:07:23,545
Great. So now we have the rifle and arms,

172
00:07:23,540 --> 00:07:24,800
and as you can see,

173
00:07:24,800 --> 00:07:26,670
it's not positioned perfectly.

174
00:07:26,674 --> 00:07:29,434
What we can do is we can move it from the prefab.

175
00:07:29,435 --> 00:07:32,225
You might be thinking, why is it not positioned to write?

176
00:07:32,225 --> 00:07:35,395
Well, if we go back into resources right here,

177
00:07:35,390 --> 00:07:37,700
you can see, if you look closely that

178
00:07:37,700 --> 00:07:40,210
the shotgun spray can see where it ends.

179
00:07:40,205 --> 00:07:43,675
The rifle has a bit of space in the front and the back.

180
00:07:43,670 --> 00:07:45,530
So this is just a technicality

181
00:07:45,530 --> 00:07:47,270
and if you add this one for example,

182
00:07:47,270 --> 00:07:48,490
it will be even farther.

183
00:07:48,485 --> 00:07:51,035
So what I'm going to do is I'm simply going

184
00:07:51,035 --> 00:07:54,355
to maybe move this in the x-direction a bit.

185
00:07:54,350 --> 00:07:58,190
So there we go around zero-point

186
00:07:58,190 --> 00:08:02,570
40 to copy this and add it to the rifle prefab.

187
00:08:02,570 --> 00:08:04,910
So now when I turn off the rifle,

188
00:08:04,910 --> 00:08:05,990
Let's try this again,

189
00:08:05,990 --> 00:08:09,230
added to the weapons on the go at fits perfectly.

190
00:08:09,230 --> 00:08:10,660
So remove this.

191
00:08:10,655 --> 00:08:12,095
Turn on the rifle.

192
00:08:12,095 --> 00:08:13,465
We have the firing point,

193
00:08:13,460 --> 00:08:14,720
we have the rifle bullets,

194
00:08:14,720 --> 00:08:17,680
we have everything set properly.

195
00:08:17,675 --> 00:08:18,745
Let's test this out,

196
00:08:18,740 --> 00:08:20,480
save that, run the game.

197
00:08:20,480 --> 00:08:22,450
Let's make this a bit bigger.

198
00:08:22,445 --> 00:08:25,135
Okay, so there we go. Yep, there we go.

199
00:08:25,130 --> 00:08:27,620
You can see right now that we have the shotgun,

200
00:08:27,619 --> 00:08:28,969
not the shotgun, excuse me,

201
00:08:28,970 --> 00:08:30,980
the actually let's maximize on

202
00:08:30,980 --> 00:08:35,210
play the game to see it properly.

203
00:08:35,210 --> 00:08:37,100
There we go. So now when should the bullets,

204
00:08:37,100 --> 00:08:38,930
they are much faster and

205
00:08:38,930 --> 00:08:41,030
the time between shots is much better.

206
00:08:41,030 --> 00:08:42,860
There we go. How cool is that?

207
00:08:42,860 --> 00:08:44,330
Don they look really nice?

208
00:08:44,330 --> 00:08:47,240
Maybe we should make their damage a bit less,

209
00:08:47,240 --> 00:08:50,410
but didn't make sure if the damage was working correctly.

210
00:08:50,405 --> 00:08:52,915
And you can see it turns around and does everything

211
00:08:52,910 --> 00:08:56,290
the shotgun was doing and it was pretty easy to create.

212
00:08:56,285 --> 00:08:59,105
So with that, I'm going to issue you

213
00:08:59,105 --> 00:09:02,365
a challenge and it is to add your own weapons.

214
00:09:02,360 --> 00:09:06,190
So create one or two more weapons of your own choosing.

215
00:09:06,185 --> 00:09:08,045
I'm going to add a pistol.

216
00:09:08,045 --> 00:09:11,065
It's, everything will be the same just like I showed.

217
00:09:11,060 --> 00:09:14,060
I will create a different bullet for it and etc.

218
00:09:14,060 --> 00:09:16,700
So maybe you've downloaded some weapons,

219
00:09:16,700 --> 00:09:19,060
sprites of futuristic weapons.

220
00:09:19,055 --> 00:09:21,355
And I really wanted to do that,

221
00:09:21,350 --> 00:09:26,570
but I didn't find a really nice set of futuristic opens,

222
00:09:26,570 --> 00:09:28,760
all the sprites where either you had to

223
00:09:28,760 --> 00:09:31,400
pay for them or they weren't that good.

224
00:09:31,400 --> 00:09:34,160
And I wanted to make sure that this all end.

225
00:09:34,160 --> 00:09:36,050
All of my courses of the assets

226
00:09:36,050 --> 00:09:38,330
that we use are 100% free.

227
00:09:38,330 --> 00:09:41,380
And finally, at least one more weapon,

228
00:09:41,375 --> 00:09:45,235
or add at least one more weapon with its own attributes.

229
00:09:45,230 --> 00:09:47,120
So pause the video right now,

230
00:09:47,120 --> 00:09:51,280
go do the challenge in the next video, maybe right now,

231
00:09:51,275 --> 00:09:52,975
I'll just use the magic of editing,

232
00:09:52,970 --> 00:09:54,890
create the weapon you've seen the process,

233
00:09:54,890 --> 00:09:56,680
you don't have to see her again,

234
00:09:56,675 --> 00:09:59,605
but I do recommend that you add your own weapons.

235
00:09:59,600 --> 00:10:03,170
Trusting it is much more fun to have weapons that

236
00:10:03,170 --> 00:10:06,830
you've created and not just things that you copy from me.

237
00:10:06,830 --> 00:10:10,390
So that said I'll see you in just a bit.

238
00:10:10,385 --> 00:10:12,505
Okay, welcome back.

239
00:10:12,500 --> 00:10:15,320
So I've added a pistol and

240
00:10:15,320 --> 00:10:18,800
I just had a couple of wacky things I wanted to create.

241
00:10:18,800 --> 00:10:20,510
You can see, so I've

242
00:10:20,510 --> 00:10:23,450
made a stall with a time between shots.

243
00:10:23,450 --> 00:10:25,010
I've made a pistol bullet.

244
00:10:25,010 --> 00:10:26,950
It's not a perfect crystal bullet.

245
00:10:26,945 --> 00:10:28,895
It's kind of big, honestly,

246
00:10:28,895 --> 00:10:30,715
when it comes to the way

247
00:10:30,710 --> 00:10:32,840
the pistol works or the size of the pistol.

248
00:10:32,840 --> 00:10:34,720
But let's not worry about that.

249
00:10:34,715 --> 00:10:37,375
This game is all about creativity and having fun.

250
00:10:37,370 --> 00:10:38,470
So whatever you wanna do,

251
00:10:38,465 --> 00:10:39,835
just make it. So there you go.

252
00:10:39,830 --> 00:10:41,320
You can see the little pustule.

253
00:10:41,315 --> 00:10:44,165
It moves around and when we should book, there we go.

254
00:10:44,165 --> 00:10:46,615
And you can see that the bullet is kind of big,

255
00:10:46,610 --> 00:10:49,760
but I really think it is really nice.

256
00:10:49,760 --> 00:10:53,630
So it will at least differentiate between

257
00:10:53,630 --> 00:10:56,300
the regular bullets of the shotgun and

258
00:10:56,300 --> 00:10:59,300
the bullets of the rifle.

259
00:10:59,299 --> 00:11:01,159
So you'll know that this is a pistol

260
00:11:01,160 --> 00:11:03,190
and this is the bullet of the piston.

261
00:11:03,185 --> 00:11:05,645
So with that done, I hope you enjoy it.

262
00:11:05,645 --> 00:11:08,465
I hope you created your own weapons.

263
00:11:08,465 --> 00:11:11,195
And if you haven't already leave me a review,

264
00:11:11,195 --> 00:11:12,925
it helps me out a lot.

265
00:11:12,920 --> 00:11:15,500
Make sure to commit your changes.

266
00:11:15,500 --> 00:11:17,230
There we go.

267
00:11:17,225 --> 00:11:24,025
Created a salt salt rifle

268
00:11:24,020 --> 00:11:28,300
and a pistol as extra weapons.

269
00:11:28,295 --> 00:11:31,105
So please make sure to leave me a review.

270
00:11:31,100 --> 00:11:34,280
It helps me out a ton and I'll see you in

271
00:11:34,280 --> 00:11:36,080
the next video where we will be

272
00:11:36,080 --> 00:11:38,860
actually switching between our weapons.

273
00:11:38,855 --> 00:11:41,075
As you can see, we have to turn on and off

274
00:11:41,075 --> 00:11:44,305
certain weapons and we can even turn on to weapons,

275
00:11:44,300 --> 00:11:45,530
which is a cool mechanic,

276
00:11:45,530 --> 00:11:48,650
but not one that we are looking to do,

277
00:11:48,650 --> 00:11:51,200
especially when it's not in our control.

278
00:11:51,200 --> 00:11:54,630
So I'll see you in the next video.

