So you want to make a shotgun?

By Postal


//
This is designed to be a simple method to make a shotgun, instead of reading through the whole of Windex's irc log 3, but I do suggest that you read through the whole log, it includes many things not in this short tutorial. The log can be found at www.PlanetUnreal.com/WoD
//


Tutorial based on an irc chat lesson by Windex.  Also thanks to the myriads of people in that chat, who talked so much that I could not edit it all out, and had to rewrite the whole thing.
//


You ready to make a weapon of destruction?


We are going to make a shotgun capable of loading up multiple shells with alt fire, sort of like how you can load up multiple rockets in the eightball, but not quite.


We could make a shotgun that shoots grenades in alt, or nuclear missiles, or black holes, or what ever you can want, but not today.


Now this shot gun we are going to make in primary fires one shell just like a normal shot gun, but with alt fire you can load up more shells to fire in primary. So you hit alt fire once you now will shoot *two* shells at once instead of just one. This will have a maximum of 4.


//Note: About 30 pages of how a real shotgun works in comparison to this game one was edited out here, please send thanks in cash to Postal. :)


Ok Open up unrealed, henceforth refereed to as ued, you should have at least UT version 436, but this should work with all UT versions, and if not for a few of my changes, all the unreal versions. We will be use ued 2.0, which will deprive us of the old joys of ued 1.0 crashing and losing lots of work.


Open the actor browser (view-actor class browser) open up inventory, then weapon. Double click on flakcannon to open it, minimize the window that opens up. Then double clicks on automag, and minimizes that same window that popped back up.


Now click on the weapon class to highlight it the right click, click new. Package is what the *.u file will be named, and name is what the thing you are making is named. Type in MyMod for Package, and Shotgun for name and hit ok. Maximize the window that pops up now. This is where you will edit code.


On the left you will see a list of the classes you have open, there will be automag, flakcannon, and shotgun, you can switch between them by double clicking on those, now double click on flakcannon. Find function fire can copy the whole thing in to you shotgun. Do the same with function AltFire, and state normal fire, and function PlayPostSelect. Now you can close the flak cannon class by double clicking on it and hitting the little icon all the way on the left of that bar on top. Now copy the ProcessTraceHit function out of the automag into you shotgun and
the automag.

//Warning Boring Part

You probably wonder what all that stuff is, even if you don't here what it does, function fire and alt fire