Rotational bundles in Handweapon files

Ask questions, discuss ideas, get answers
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Rotational bundles in Handweapon files

Post by Apache Thunder »

You add the minigun child object to the firearm instead of the handweapon? There isn't any other way and I assumed you know how to move a child object to a different object bundle. :P
Swaffy wrote:So are you saying that I can fire two weapons at once when I click the left mouse button? For the longest time, I've been curious about adding one or two FireArms to a HandFireArm and set the to be fired when the main gun is fired.
Yes you can add firearms to handweapons and get them to fire projectiles. Just make sure the round of fire and ammo/mag counts match or else they may interfere with each other and you'll notice the handweapon not firing when it still has ammo left.
ImageImageImage
I have cameras in your head!
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Rotational bundles in Handweapon files

Post by Vilespring »

During my begining of my modding days, I debug modded a lot and got the CAR-15 in desert combat to use the bradly's auto gun as it's main gun. it looked funny, a massive barrel on a tiny gun. I noticed unless you were walking, the gun hit a bit up and to the left, staying true to the gun. Does the "CreateInGrid" make projectiles go true to their firearm direction, instead of going to the center of the camera? (something I've always wondered)
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Rotational bundles in Handweapon files

Post by Apache Thunder »

Actually I think it may be the "ObjectTemplate.fireInCameraDoF" command that does that. If you use that on aircraft with mouse lock enabled, you can aim with mouse lock by rotating the camera. That's why certain helicopters in DesertCombat like the little bird can aim like this while others do not.

If it's turned on, the position of the projectile (that is the projectilePosition and or addFireArmsPosition settings) become linked to the camera. I checked some of the code and it appears that most if not all handweapons have this code enabled. Thus the projectile position is relative to the camera and not mesh. Handweapons are handled differently then fireArms due to the host meshes being tied to the soldier skeleton which animates. So I don't think projectiles will fire out of the correct location on a handweapon if the fireInCameraDoF command is turned off or omitted.

For example I needed to add this command to a special handweapon that i use to detonate mines with since the projectile wouldn't fire in the correct place.It fires a special projectile that has armor turned on and a mass higher then the mine's they are detonating. Projectiles can cause other projectiles that have proximity fuses to detonate so long as the projectile that you want to trigger a proximity projectile explode from has armor turned on and has a mass higher then the target projectile. You don't need to give the projectile a collision mesh, but it does need to have collision physics turned on, otherwise projectiles with proximity fuses won't react to them. This holds true to PCOs, if a PCO doesn't have collision physics turned on, it can't trigger landmines. Also any object you want to trigger a landmine with must have a mass higher then the landmine type projectile. This is how I got my RC minitank vehicles to not trigger landmines in my mod. They have a lower mass then the landmine. I gave the landmine a mass of 600 or so. All my normal vehicles have mass'es higher then that. But my minitanks do not. Thus they can run over them without detonating them. ;)
ImageImageImage
I have cameras in your head!
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Rotational bundles in Handweapon files

Post by Vilespring »

Apache Thunder wrote:This is how I got my RC minitank vehicles to not trigger landmines in my mod.
hehe I'm listening. I want to see your mod now. I've been trying to make a mini M10, but no luck.
thanks for the the useful info, once again! :lol: .
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
Post Reply