Tip:
Highlight text to annotate it
X
OK so in this tutorial I am going to show you how to finish up a mod weapon.
My toaster is looking OK, but it could still really use some polish.
Right now my main problem with it is that it's kinda too centered.
I want it to be more to the left (and by the way, all weapons should face to
the right when you make them)
The first thing I did was that I mocked up what I wanted to change in my image program.
Based on this, I think this toaster should really be 50 pixels to the left.
So I can nudge it left in 2 ways. The first way is to move the toaster 50 pixels
left in its images, but this will change the way it animates because
the pivot of the motions will change relative to the position of the image.
For example, imagine that this is your image. and that circle is the pivot.
notice that the actual movement of the weapon is different than it was before
now that it's moved to the left the animation has changed.
The other way is that I can subtract 50 pixels from the x position of every single frame
in every single animation and particle spawn.
Now I know this will be a pain, but this choice will be the best way since
I am already happy with the way it animates... and changing the animation will be even harder.
so here i go.
ok it feels better on the screen now to the left.
I had to increase the speed of the flying toast too to account for change.
and looks cool, but the toast flying out.. is still kinda even.
Like both toasts fly out at the same speed and seem to me a bit unrealistically uniform.
So I'm going to split the spawn node up into 2 so that I can control each toast individually.
this n="2" controls how many spawn from this position on this frame.
But I can change this to 1 and now I have individual control over each
piece of flying toast. It should look the same right now.
I'll adjust it now to give it a little variation.
OK, it looks a lot more chaotic flying out now since one always flies out harder than
the other. I spaced them out a little more too.
I like it.
Also I reduced the amount of ammo to 12, I thought it looks more like a real loaf.
Now, something is still kinda missing. If this is supposed to be badly burnt toast,
really this toast should be causing a lot of smoke.
So I created this smoke image. I called it toasterSmoke.png
I know it doesn't look like much yet, but layered it should look pretty nice.
and you can feel free to steal this smoke image for your own particles if you want.
Now to implement this I have to create a new particle emitter here,
and I put toasterSmoke here because that's the name of the image.
Note that I left it set to blend mode 2, which means: use transparency.
And now I'll add some smoke spawns to this 'shot1' animation.
OK you can see my smoke spawns here. Since the emitter with 'id' 1 is the toasterSmoke,
all the spawns with the e="1" are the smoke spawns.
I tried to make the spawns occur as the toast travels accross the screen.
sweet!!!!
Now I wanna add 1 more finishing touch to this weapon.
I want to smooth out the way that the toaster cools down.
see how the red kinda just pops in and out? im going to use a particle to make it look
like it smooths away. To do this I am going to have to do 2 things.
1 is add a transition image that has the slot up and the light on.
I don't have this yet. and I need this so that I don't have to try
to match the motion of the particle with the toaster motion.
Like here. I just want the particle to spawn in place
and fade quickly or it will be too hard to implement.
and the other thing I am going to need is to create a particle.
the particle will spawn as soon as this transition image stops showing
and make it look like the heat is fading. It will create the illusion that the toaster
is cooling off. ...
OK here is the transition image, it's just like the others except this has both the light
on and the switch up and here is the particle image.
This will show up right after the transition image is done showing.
The background is black, but the black will appear transparent when I use 'add' blending
for it. Using 'add' blending is very handy for effects
like lights or fire. If you want to simulate how 'add' blending
will look ahead of time, you can mock it up in Gimp by using the 'Addition' layer
blend mode. If you are using Photoshop, use the 'Linear
Dodge (Add)' layer blend mode.
So let's make the emitter. The new one should have 'id' 2, since 0 and
1 are taken. set it to 'add' blend mode which is 3
and I am going to copy one of the toast spawns to spawn it.
set the 'e' to 2, which corresponds to the emitter I want to use.
and move it over to the general area where it should spawn.
Now let's take a look at what it looks like in GunApp.
hmmm, it needs some more work...
I decided to stop here really quick to show you where I'm at,
and maybe give a better idea of what I'm trying to do with the particle.
Now I am going to take my time to add the transition image
and time the emitter with the same settings that I already showed you how to use...
...
OK so things didn't really work as I planned. I had put the fading on the shot. But I removed
it again because it kinda deadened the feel of the shot impact
since the red fading was so smooth looking on every firing.
However I kept it on the reload so you can see the effect and see how I made it.
Look for it at the end of the reload. see?
The red fades nice and smooth.
Now this weapon is looking polished... BUT there is one more HIDDEN thing that you should
know. GunApp has multiplayer!
So wouldn't it be cool if your weapon can shoot other devices over the wifi??
Of course it would!!!
right now this weapon is still shooting 'bullets' over the wifi because that's what the Scribble
Gun had.
So the way we fix that is with the 'netSend' attribute of a frame.
any frame you want can send a netSend... a separate netSend message will be sent for
every frame that has one. however the most important thing to keep in
mind about this is that you REALLY want to be careful with
netSends because you can flood your network if you put too
many next to each other, plus it makes for a pretty non-fun experience
on the devices that recieve too many concurrent netSends.
So just remember to use as few netSends as possible to get your effect.
A good rule of thumb is about 1 netSend per shot animation. 2 at most.
So what number do you put in the netSend for the frame?
We had a table put up on the wiki for what each value causes on the other device
so you can apply the one you think is appropriate for your weapon.
Let's take a look...
OK on the PC version you can enable networking by pressing keypad 0.
see that? As you can see the toast is causing bullets!!!
and you can see here it gets network signals from the device too.
but you won't see the impact effects because they don't come with the PC version of GunApp
So what about my toast? I feel pretty strongly that burnt toast should
cause any targets to catch fire. So I will go to the wiki and see what number
corresponds to the fire impact effect.
here "flame shot": number 4
I'm going to paste in here where it says netSend save it.
reload it.
see that?
But to be honest, this is not good enough.
I want something a little more more blasty. So let's see what else we got...
let's try 8 - screen shatter - like a bomb!
switch it to 8.
save it.
reload it.
It's pretty good, I'm going to delay it a little bit.
reload it.
pretty good, needs a little more delay.
reload it.
Nice.
Alright so I've got all my assets ready and all i have to do...
is... zip them up...
name it 'toaster'... and here's my mod weapon!
This weapon is done!
So thats almost everything there is to know about making a GunApp mod.
Also, if this is your first weapon, remember that it's very easy to simplify a
weapon. For example you can reduce the amount of images
it uses by just deleting these.
... or delete out animations like reload (which lets you also delete ammo)
or if there are multiple shot animations you can get rid of all of them, except for 1,
you can also remove emitters and their spawns, The weapon will still work without these things.
In fact like I said, if you have the Windows version of GunApp its pretty easy to test
what breaks the game. not to mention that the Windows version also
gives you more feedback on why you might be crashing.
So I hope you enjoyed the demos, I will have this toast weapon posted to the wiki as an
example for you! have fun! :D