Advanced gun mechanics
by Kyrah Abattoir · in Torque 3D Beginner · 09/26/2012 (5:17 pm) · 3 replies
This is another one of my noobish topics, so , bear with me.
A while ago i fidled a lot with the chinatown demo, trying to understand the way the gun state system work.
I found it to be pretty neat but it got me wondering.
Lets say you wanted to make a pistol where the player has a key to pull out the clip to check how many rounds are left, would you end up having to create a state for every possible bullet counts? or is there some way to have a specific state ... affected by the overal variables of the weapon image?
Examples:
-Show/hide shells inside a revolver based on how many where actually reloaded after an ejection and in which chambers.
-Show/hide the "bullet in the chamber" when the player pull the slide halfway (another ammo check)
A while ago i fidled a lot with the chinatown demo, trying to understand the way the gun state system work.
I found it to be pretty neat but it got me wondering.
Lets say you wanted to make a pistol where the player has a key to pull out the clip to check how many rounds are left, would you end up having to create a state for every possible bullet counts? or is there some way to have a specific state ... affected by the overal variables of the weapon image?
Examples:
-Show/hide shells inside a revolver based on how many where actually reloaded after an ejection and in which chambers.
-Show/hide the "bullet in the chamber" when the player pull the slide halfway (another ammo check)
About the author
3D artist, programmer, game designer, jack of all trades, master of none.
#2
SemiAutomatic weapons eject shell casings...
Kinda sounds like an Art & Scripting solution to me?!?
09/29/2012 (4:39 am)
Revolvers don't eject shells; they stay in the cylinder until reloading....SemiAutomatic weapons eject shell casings...
Kinda sounds like an Art & Scripting solution to me?!?
#3
Similar effect could be hacked around with through hiddenmeshes..
09/29/2012 (11:35 am)
Is it possible? Yes, but not out of the box. It will take close cooperation between a coder, scripter, and artist. Visibility animations are the key. It doesn't take much to step through them frame by frame, and with a little extra code you could set an explicit frame to show at any given time. Since each state in a ShapeImage statemachine can call a script method, there are several logical places where changing such an animation could take place. Visibility animations, I love 'em... unfortunately it wouldn't work in collada since it (the format) doesn't allow visibility animations. Too bad IFLs were removed or it would be even easier. Similar effect could be hacked around with through hiddenmeshes..
Torque 3D Owner Kenneth Eves
XAP GAMES
Perhaps the "inspectclip" function could trigger mesh hiding on the bullets then the animation displays the clip to the player.