Throwing Knifes
-
- Posts: 139
- Joined: Mon Mar 29, 2010 10:28 pm
Throwing Knifes
Hey, is there any possbile way I can make knfies thow? Just like that game CS:S? So when they right click, the knife would throw.

Im Watching You... When You Sleep!
Re: Throwing Knfies
An SSM way of doing this would have you addTemplate a bullet to the knife, but CSM, I have no clue.... You could play around with it, and if you can, create a new bullet and maybe set an animation to it.
-
- Posts: 139
- Joined: Mon Mar 29, 2010 10:28 pm
Re: Throwing Knfies
I think there is, the Commando, I believe. Try checking through the files to see. Don't have BF1942 installed as of the moment.
Re: Throwing Knfies
throwing knives are basically the non driving essence of the interstate mod! 
Both teams have them as default kit.. maybe best way is to grab the mod and have a play/look through the code.. www.is82.com

Both teams have them as default kit.. maybe best way is to grab the mod and have a play/look through the code.. www.is82.com
Re: Throwing Knfies
The projectile Geometry would be a knife. Then you'd add the spinning effect used on the grenade [ObjectTemplate.rotationalSpeed 2/0/0]. After that, you would add bullet drop to the Projectile Template [ObjectTemplate.gravityModifier 1.0].
For the rest of the junk, just copy over the throwing Knife from Secret Weapons of WWII. It's very easy to do. You would need:
Animations from Snimations.rfa plus the Animation speed scripting
Sounds from Sounds.rfa
Textures from Textures.rfa
Meshes from StandardMesh.rfa
Images from Menu.rfa
And the scripting in Objects.rfa
For the rest of the junk, just copy over the throwing Knife from Secret Weapons of WWII. It's very easy to do. You would need:
Animations from Snimations.rfa plus the Animation speed scripting
Sounds from Sounds.rfa
Textures from Textures.rfa
Meshes from StandardMesh.rfa
Images from Menu.rfa
And the scripting in Objects.rfa
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
-
- Posts: 139
- Joined: Mon Mar 29, 2010 10:28 pm
Re: Throwing Knifes
So did I do this right?
Code: Select all
ObjectTemplate.create HandFireArms KnifeAxis
ObjectTemplate.itemIndex 1
ObjectTemplate.projectileTemplate KnifeProjectile
ObjectTemplate.projectilePosition 0/0/0
ObjectTemplate.magSize -1
ObjectTemplate.numOfMag 4
ObjectTemplate.magType 0
ObjectTemplate.reloadtime 1
ObjectTemplate.fireOnce c_True
ObjectTemplate.roundOfFire 2
ObjectTemplate.GUIIndex 83
ObjectTemplate.setHudAmmoType ATNone
ObjectTemplate.setCrossHairType CHTIcon
ObjectTemplate.fireInCameraDof 1
ObjectTemplate.loadSoundScript Sounds/knife.ssc
ObjectTemplate.soldierCameraPosition 0/-0.03/0.1
ObjectTemplate.aiTemplate KnifeAxis
ObjectTemplate.velocity 50
ObjectTemplate.createSkeleton animations/KnifeAxis.ske
ObjectTemplate.useSkeletonPartAsMain Base
ObjectTemplate.addTemplate KnifeAxisLod
rem *** Objects ***
ObjectTemplate.create SimpleObject KnifeAxisSimple
ObjectTemplate.geometry Shad_KnifeAxis
ObjectTemplate.create AnimatedBundle KnifeAxisComplex
ObjectTemplate.geometry KnifeAxis
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.createSkeleton animations/KnifeAxis.ske
ObjectTemplate.create LodObject KnifeAxisLod
ObjectTemplate.lodselector HandWeaponLodSelector
ObjectTemplate.addTemplate KnifeAxisComplex
ObjectTemplate.addTemplate KnifeAxisSimple
rem*** Modded knfie ***
ObjectTemplate.rotationalSpeed 2/0/0
ObjectTemplate.gravityModifier 1.0

Im Watching You... When You Sleep!
Re: Throwing Knifes
Hello. I just added the throwingknife from Xpack2, and it works brilliant:).
I have done it so the throwingknife replaces the ordinary knife. And its not a mod I'm doing. only a map. So its mapside.
But, I can't figure out how to get the soldiers animation to match the throwingknife.
I have all the animation files in place and so on, but how to link it together?
I understand that it is the soldier object I have to modify. But how.... hmmm.
I have done it so the throwingknife replaces the ordinary knife. And its not a mod I'm doing. only a map. So its mapside.
But, I can't figure out how to get the soldiers animation to match the throwingknife.
I have all the animation files in place and so on, but how to link it together?
I understand that it is the soldier object I have to modify. But how.... hmmm.
I want to live in a created universe. Virtual reality, here I come.
Re: Throwing Knifes
Look in the "AnimationStatesShoot.con" file. You should look in there for any hooblah relating to the throwing knives.
For soldier anims, there might be something in the "AnimationStatesUpper.con" file.
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
A project like this isn't very easy, and is a moderate level mod.
For soldier anims, there might be something in the "AnimationStatesUpper.con" file.
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
No. If you read my post correctly, you'd know to put the gravityModifier in the projectile template [the thing that says "create Projectile ProjectileName"]. The rotationSpeed goes under the "create HandFireArms KnifeAxis" section. For simplicity's sake, just copy the throwing knife projectile template.Master Jay wrote:So did I do this right?
Code: Select all
ObjectTemplate.create HandFireArms KnifeAxis ObjectTemplate.itemIndex 1 ObjectTemplate.projectileTemplate KnifeProjectile ObjectTemplate.projectilePosition 0/0/0 ObjectTemplate.magSize -1 ObjectTemplate.numOfMag 4 ObjectTemplate.magType 0 ObjectTemplate.reloadtime 1 ObjectTemplate.fireOnce c_True ObjectTemplate.roundOfFire 2 ObjectTemplate.GUIIndex 83 ObjectTemplate.setHudAmmoType ATNone ObjectTemplate.setCrossHairType CHTIcon ObjectTemplate.fireInCameraDof 1 ObjectTemplate.loadSoundScript Sounds/knife.ssc ObjectTemplate.soldierCameraPosition 0/-0.03/0.1 ObjectTemplate.aiTemplate KnifeAxis ObjectTemplate.velocity 50 ObjectTemplate.createSkeleton animations/KnifeAxis.ske ObjectTemplate.useSkeletonPartAsMain Base ObjectTemplate.addTemplate KnifeAxisLod rem *** Objects *** ObjectTemplate.create SimpleObject KnifeAxisSimple ObjectTemplate.geometry Shad_KnifeAxis ObjectTemplate.create AnimatedBundle KnifeAxisComplex ObjectTemplate.geometry KnifeAxis ObjectTemplate.hasDynamicShadow 1 ObjectTemplate.createSkeleton animations/KnifeAxis.ske ObjectTemplate.create LodObject KnifeAxisLod ObjectTemplate.lodselector HandWeaponLodSelector ObjectTemplate.addTemplate KnifeAxisComplex ObjectTemplate.addTemplate KnifeAxisSimple rem*** Modded knfie *** ObjectTemplate.rotationalSpeed 2/0/0 ObjectTemplate.gravityModifier 1.0
A project like this isn't very easy, and is a moderate level mod.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™