what do weapon models need to work ingame?
by Are Kristiansen · in Torque 3D Beginner · 08/26/2015 (10:41 am) · 16 replies
ok, after been "kicked" out of the "Tutorial Request Thread," I will open an own thread for this.
I want to add a new weapon, now:
- I know about the fps tutorial and scripts I have to make
- I know how to make a 3dmodel, ( have over 100 of them)
So what I need to know is this:
The FP gun, what bones and other stuff do it need to work ingame
The TP gun, is that just a static mesh and doesnt need anything extra?
EDIT:
I am able to get model ingame, but not working propperly.. does it need a flashmodel in front?

I want to add a new weapon, now:
- I know about the fps tutorial and scripts I have to make
- I know how to make a 3dmodel, ( have over 100 of them)
So what I need to know is this:
The FP gun, what bones and other stuff do it need to work ingame
The TP gun, is that just a static mesh and doesnt need anything extra?
EDIT:
I am able to get model ingame, but not working propperly.. does it need a flashmodel in front?

#2
08/27/2015 (9:21 am)
Thx Simon, I am outa here :) new forum here I come
#3
There is another on the Garagegames site, docs.garagegames.com/torque-3d/official/content/documentation/Scripting/Advanced...
08/28/2015 (3:30 pm)
Go to www.codesampler.com/torque.htm there's a section on weapons.There is another on the Garagegames site, docs.garagegames.com/torque-3d/official/content/documentation/Scripting/Advanced...
#4
Here's a resource that might help - though it doesn't contain the source art.
08/28/2015 (4:03 pm)
That's the "Tutorial Request Thread," not "The Tutorial Thread." So simply requesting a tutorial on how to get weapons into the game would have sufficed.Here's a resource that might help - though it doesn't contain the source art.
#5
http://docs.garagegames.com/torque-3d/official/content/documentation/Scripting/Advanced/ShapeBaseImageData.html#Weapon_Shape_Nodes
thx a big time, I'll be sure to share all stuff I dont need to keep for myself over at my blog:
http://www.wolfsquad.org/
thx guys!!!
08/29/2015 (3:21 am)
Thanx Pierre, this was JUST what I was looking forhttp://docs.garagegames.com/torque-3d/official/content/documentation/Scripting/Advanced/ShapeBaseImageData.html#Weapon_Shape_Nodes
thx a big time, I'll be sure to share all stuff I dont need to keep for myself over at my blog:
http://www.wolfsquad.org/
thx guys!!!
#7
It may pay to import into your 3d editor a character model as a size ref.
Looking at your www.wolfsquad.org/?p=36, it may also head you figure out the front too. ;)
What tool are you using?
08/29/2015 (4:28 pm)
The trick is to make sure you scale things correctly.It may pay to import into your 3d editor a character model as a size ref.
Looking at your www.wolfsquad.org/?p=36, it may also head you figure out the front too. ;)
What tool are you using?
#8
Buzzy in real life too :)
I am using milkshape.
And yes I have taken out a player model allready, but first of all I just want to make a weapon that actually works and then later put some real effort into it.
now a question as I am dumb as a .. I dont know :)
how do I make self made animation work with the player? do I use the skeleton or what?
09/01/2015 (9:21 am)
Sorry for late reply, Pierre..Buzzy in real life too :)
I am using milkshape.
And yes I have taken out a player model allready, but first of all I just want to make a weapon that actually works and then later put some real effort into it.
now a question as I am dumb as a .. I dont know :)
how do I make self made animation work with the player? do I use the skeleton or what?
#9
http://www.garagegames.com/community/resources/view/22954 does have some information in it.
The other link I provide has most information in it. But nothing wrong with using someone else code that's been free put on the forums.
09/01/2015 (4:58 pm)
Use the default character as you base. You could use the Soldier or Alien Weapon Art packs, as they do have customized scripts for their weapon/character anim.http://www.garagegames.com/community/resources/view/22954 does have some information in it.
The other link I provide has most information in it. But nothing wrong with using someone else code that's been free put on the forums.
#10
09/02/2015 (9:50 am)
So if understand you correctly what I do on the third person can be transformed over to FP by scripts?
#11
09/03/2015 (1:14 pm)
basically yes
#12
But the good thing is when I have managed it once its easier next time...
09/08/2015 (10:35 am)
OMG... This is really giving me a headache :)But the good thing is when I have managed it once its easier next time...
#13
09/22/2015 (5:10 pm)
there this it's a bit old, and a few folder references have changed, but it's basically the core of all weapon design for Torque
#14
There is some custom stuff there, which are commented out. The stateSounds you'll need a SFXProfile for. See the RocketLauncer for an example. You might also want to change the decal which is generated at impact. See the decal value in the projectile. There might be some things not covered, but just play around with those values to get the effect you want.
You can find an explenation of all the variables in the T3D Script Manual.
09/22/2015 (5:40 pm)
To change the behavior of a weapon, look at the image's state block. This is the state block used for a machine gun:// Initial start up state stateName[0] = "Preactivate"; stateTransitionOnLoaded[0] = "Activate"; stateTransitionOnNoAmmo[0] = "NoAmmo"; // Activating the gun. // Called when the weapon is first mounted and there is ammo. stateName[1] = "Activate"; stateTransitionOnTimeout[1] = "Ready"; stateTimeoutValue[1] = 0.6; stateSequence[1] = "Activate"; // Ready to fire, just waiting for the trigger stateName[2] = "Ready"; stateScript[2] = "onReady"; stateSequence[2] = "Ready"; stateTransitionOnNoAmmo[2] = "NoAmmo"; stateTransitionOnTriggerDown[2] = "Fire"; //stateTransitionOnAltTriggerDown[2] = "Zoom"; // Fire the weapon. Calls the fire script which does the actual work. stateName[3] = "Fire"; stateTransitionOnTimeout[3] = "Ready"; stateTimeoutValue[3] = 0.1; // This value decides how fast it will shoot stateFire[3] = true; stateRecoil[3] = LightRecoil; stateAllowImageChange[3] = false; stateSequence[3] = "Fire"; stateScript[3] = "onFire"; stateEjectShell[3] = false; //stateSound[3] = MachineGunFire; stateEmitter[3] = MachineGunFiringEmitter; stateEmitterTime[3] = 1.4; // Play the reload animation, and transition into stateName[4] = "Reload"; stateTransitionOnNoAmmo[4] = "NoAmmo"; stateTransitionOnTimeout[4] = "Ready"; stateTimeoutValue[4] = 1.5; stateAllowImageChange[4] = false; stateSequence[4] = "Reload"; stateEjectShell[4] = false; //stateSound[4] = MachineGunReload; // No ammo in the weapon, just idle until something shows up. // Play the dry fire sound if the trigger is pulled. stateName[5] = "NoAmmo"; stateTransitionOnAmmo[5] = "Reload"; stateScript[5] = "onReload"; stateSequence[5] = "NoAmmo"; stateTransitionOnTriggerDown[5] = "DryFire"; // No ammo dry fire stateName[6] = "DryFire"; stateTimeoutValue[6] = 0.01; stateTransitionOnTimeout[6] = "NoAmmo"; //stateSound[6] = MachineGunFireEmptySound;
There is some custom stuff there, which are commented out. The stateSounds you'll need a SFXProfile for. See the RocketLauncer for an example. You might also want to change the decal which is generated at impact. See the decal value in the projectile. There might be some things not covered, but just play around with those values to get the effect you want.
You can find an explenation of all the variables in the T3D Script Manual.
#15
eg.
Multi Projectile Weapons
RepairGun / Repair Rifle
Grappling Hook
Charging Plasma Cannon
09/22/2015 (5:47 pm)
might also be worth while looking at the old Tribes scripts you'll find some interesting features that can be used in torque.eg.
Multi Projectile Weapons
RepairGun / Repair Rifle
Grappling Hook
Charging Plasma Cannon
#16
also found this a bit usefull as I am an Milkshape user :)
http://www.garagegames.com/community/forums/viewthread/37219
09/24/2015 (11:03 am)
thanx a lot!also found this a bit usefull as I am an Milkshape user :)
http://www.garagegames.com/community/forums/viewthread/37219
Associate Simon Love
Alternatively, you can also drop in on the IRC chat, where T3D veterans are available day and night and are generally super helpful and precise.
server name : irc.maxgaming.net
channel : #garagegames
If you don't have an IRC client handy, use KiwiIRC in your browser.
Best of luck!