Fully Animated First Person Shotgun
by Jason Campbell · 03/07/2015 (10:09 pm) · 7 comments
Shotgun for Torque 3.6.3 by Jason Campbell
Update: Shotgun Fire Sound and Shotgun Reload Pump have a Creative Commons License please see readme in either archive if you use them.
Fully Animated First Person Shotgun. Third person included.
Use however you like.
Skip Part One if you are adding shotgun to existing project.
Part One: Adding shotgun to new stock T3D 3.6.3
Download the package here:
www.mediafire.com/download/omnidw6mcvdaoi4/Shotgun_Resource_Stock_363.zip
Drop the included game folder directly in your projects folder that contains your game folder.
Merge folders and say yes to over-writing.
Your new shotgun is ready to use. Hit 3 key ingame.
Part Two: Adding shotgun to existing project.
For the purpose of this asset, we will replace the Lurker Grenade Thrower(sorry that's what I did.)
Download the package here:
www.mediafire.com/download/mns2q6pmnn6ia5s/Shotgun_Resource_AddToExisting.zip
1.
Drop the included game folder directly in your projects folder that contains your game folder.
Merge with existing folders.
2.
Open game/scripts/client/default.bind.cs
and replace this:
with this:
If you have a config.cs also in game/scripts/client make sure you replace the above also.
3.
Open game/art/datablocks/datablockExec.cs
and under (// Load the weapon datablocks) add:
4.
Open game/art/datablocks/player.cs
under // Allowable Inventory Items add:
5.
Open game/scripts/server/gameCore.cs
in function GameCore::loadOut(%game, %player)
replace this:
with this:
6.
Open game/art/shapes/actors/Soldier/FP/FP_SoldierArms.cs
Add to the end of function FP_SoldierArmsDAE::onLoad(%this)
That should do it.
Update: Shotgun Fire Sound and Shotgun Reload Pump have a Creative Commons License please see readme in either archive if you use them.
Fully Animated First Person Shotgun. Third person included.
Use however you like.
Skip Part One if you are adding shotgun to existing project.
Part One: Adding shotgun to new stock T3D 3.6.3
Download the package here:
www.mediafire.com/download/omnidw6mcvdaoi4/Shotgun_Resource_Stock_363.zip
Drop the included game folder directly in your projects folder that contains your game folder.
Merge folders and say yes to over-writing.
Your new shotgun is ready to use. Hit 3 key ingame.
Part Two: Adding shotgun to existing project.
For the purpose of this asset, we will replace the Lurker Grenade Thrower(sorry that's what I did.)
Download the package here:
www.mediafire.com/download/mns2q6pmnn6ia5s/Shotgun_Resource_AddToExisting.zip
1.
Drop the included game folder directly in your projects folder that contains your game folder.
Merge with existing folders.
2.
Open game/scripts/client/default.bind.cs
and replace this:
moveMap.bindCmd(keyboard, "3", "commandToServer('use',\"LurkerGrenadeLauncher\");", "");with this:
moveMap.bindCmd(keyboard, "3", "commandToServer('use',\"Shotgun\");", "");If you have a config.cs also in game/scripts/client make sure you replace the above also.
3.
Open game/art/datablocks/datablockExec.cs
and under (// Load the weapon datablocks) add:
exec("./weapons/Shotgun.cs");4.
Open game/art/datablocks/player.cs
under // Allowable Inventory Items add:
maxInv[Shotgun] = 1; maxInv[ShotgunClip] = 8;
5.
Open game/scripts/server/gameCore.cs
in function GameCore::loadOut(%game, %player)
replace this:
%player.setInventory(LurkerGrenadeLauncher, 1); %player.setInventory(LurkerGrenadeAmmo, %player.maxInventory(LurkerGrenadeAmmo)); %player.addToWeaponCycle(LurkerGrenadeLauncher);
with this:
%player.setInventory(Shotgun, 1); %player.setInventory(ShotgunClip, %player.maxInventory(ShotgunClip)); %player.setInventory(ShotgunAmmo, %player.maxInventory(ShotgunAmmo)); %player.addToWeaponCycle(Shotgun);
6.
Open game/art/shapes/actors/Soldier/FP/FP_SoldierArms.cs
Add to the end of function FP_SoldierArmsDAE::onLoad(%this)
// BEGIN: Shotgun Sequences
%this.addSequence("art/shapes/weapons/Shotgun/shotgun_FP.DAE run", "Shotgun_run", "0", "-1", "1", "0");
%this.addSequence("art/shapes/weapons/Shotgun/shotgun_FP.DAE sprint", "Shotgun_sprint", "0", "-1", "1", "0");
%this.addSequence("art/shapes/weapons/Shotgun/shotgun_FP.DAE idle", "Shotgun_idle", "0", "-1", "1", "0");
%this.addSequence("art/shapes/weapons/Shotgun/shotgun_FP.DAE idle_fidget1", "Shotgun_idle_fidget1", "0", "-1", "1", "0");
%this.addSequence("art/shapes/weapons/Shotgun/shotgun_FP.DAE fire", "Shotgun_fire", "0", "-1", "1", "0");
%this.addSequence("art/shapes/weapons/Shotgun/shotgun_FP.DAE reload", "Shotgun_reload", "0", "-1", "1", "0");
%this.addSequence("art/shapes/weapons/Shotgun/shotgun_FP.DAE fire_alt", "Shotgun_fire_alt", "0", "-1", "1", "0");
%this.addSequence("art/shapes/weapons/Shotgun/shotgun_FP.DAE switch_out", "Shotgun_switch_out", "0", "-1", "1", "0");
%this.addSequence("art/shapes/weapons/Shotgun/shotgun_FP.DAE switch_in", "Shotgun_switch_in", "0", "-1", "1", "0");
// END: Shotgun SequencesThat should do it.
About the author
#2
It should be noted you can easily keep the Grenade Launcher just by leaving all the pertinent LurkerGrenadeLauncher code and just bind the Shotgun to key 6.
03/10/2015 (6:02 pm)
No problem. Hope you like it.It should be noted you can easily keep the Grenade Launcher just by leaving all the pertinent LurkerGrenadeLauncher code and just bind the Shotgun to key 6.
#3
stateShapeSequence[4] = "Fire"; // fire animation at the player
stateScaleShapeSequence[4] = true;
add this to the fire state and add a fire animation to the player/creature.
you may have to increase the fire state timeout also.
you also can use that to make health kits, using like a weapon, but it heal ppl or you.
A lot things are possible by using the weapon stuff. It don't need to be weapons.
03/11/2015 (6:25 am)
weapons can do a lot! The state machine is a cool thing. you can add attack animation to this, in the fire state. Cool to make creature attacking by using an invisible weapon. If the creature fire/attack it just also start the attack animation.stateShapeSequence[4] = "Fire"; // fire animation at the player
stateScaleShapeSequence[4] = true;
add this to the fire state and add a fire animation to the player/creature.
you may have to increase the fire state timeout also.
you also can use that to make health kits, using like a weapon, but it heal ppl or you.
A lot things are possible by using the weapon stuff. It don't need to be weapons.
#4
03/11/2015 (11:55 am)
That's how I did my zombie attacks. With an invisible weapon. Now that I have a better understanding of how the animation works my next plan is to replace the first person arms with something more generic and make a decent first person knife with animations.
#5
The funny thing, I had ages to find out, that we can use the weapon state machine for a lot other things. Also I first did made the attack animation in the weapon.cs, what ever has cause some weird problems.
No one told me to make the attack animation in the weapon state system :)
03/13/2015 (5:08 am)
yea, I made a knife attack that way and also a axe. For animal attacks I use a invisible weapon, the attack animation and also a attack sound in the fire state.The funny thing, I had ages to find out, that we can use the weapon state machine for a lot other things. Also I first did made the attack animation in the weapon.cs, what ever has cause some weird problems.
No one told me to make the attack animation in the weapon state system :)
#6
08/12/2015 (12:26 am)
Jason do you have a skype contact?
#7
Afraid I'm not the skype type. Is there something specific you need?
08/14/2015 (4:25 pm)
Hello Joao,Afraid I'm not the skype type. Is there something specific you need?

Torque Owner XIXWYRMEXIX
Red Rectangle Games