Scrap Double Barrel Visual Creation
I wanted to create a weapon in a Source SDK game known as Garry's Mod, which pulls assets from games like Half Life 2 and Counter Strike: Source. I used a SWEP Construction Kit interface and utilized artistic judgement and Lua programming skills to find props from those game assets and resized, moved, and duplicated them to form the basis for the barrels, trigger, stock, crossbar and sights. This was the result when the weapon was displayed in-game.
Double Barrel SWEP Code
I quickly ported the code from the prototype I made in the image above and put them into the VElements (View Model Code) and the WElements (World Model Code) as well as View Bone Model dimensions. I used an existing gun base that was compatible with the library of terms used to code in the visual aspects of the shotgun. Garry's Mod uses a specific form of a code known as Lua, and it calls its code GLua. I used my scripting knowledge of several libraries of addons coded in GLua and used existing functions to essentially splice weapon base code in with my weapon creation code. This was then ported into a custom game mode that turned the SWEP into an actual item that could be used by players.
Brett Austin
Garry's Mod Weapon Design & Scripting
Gamemode Weapon Code
This was the code I created from my knowledge of the coding language known as Lua, which was required in order to turn the SWEP into an actual weapon item in game. This would allow players to pick up, drop, equip and unequip the weapon. It would then be stored in their inventory. This was merely the final touch in the process.
Scrap Winchester Testing
This is another quick example of one of my SWEPs in action. I created it using the same processes described above. It required knowledge of Lua's coding language as well as the ability to create a gun model from scratch. Animations and the hand/arm view models were taken from Counter-Strike Source.