Author Topic: remove the "bounce" from firing tank turrets in vehicles  (Read 1548 times)

I don't know the right word, but when you put a tank turret / any turret inside of a vehicle and fire it, it causes the vehicle to flip or bounce.
Would it be possible to remove this?

Would it be possible to remove this?
It is - remove this code from Vehicle_Tank.cs:

            %tank = %mount.getObjectMount();
            if(isObject(%tank))
            {
               %theVector = %mount.getEyeVector();
               %theVector = vectorAdd(%theVector,"0 0 1");
               %theVector = vectorScale(%theVector,%tank.getDataBlock().mass*5);
               %theVector = vectorSub(%theVector,vectorScale(%thevector,2));
               
               %tank.applyImpulse(getWords(%mount.getEyeTransform(),0,2),%theVector);   
            }

It's called recoil jsyk

It is - remove this code from Vehicle_Tank.cs:

            %tank = %mount.getObjectMount();
            if(isObject(%tank))
            {
               %theVector = %mount.getEyeVector();
               %theVector = vectorAdd(%theVector,"0 0 1");
               %theVector = vectorScale(%theVector,%tank.getDataBlock().mass*5);
               %theVector = vectorSub(%theVector,vectorScale(%thevector,2));
               
               %tank.applyImpulse(getWords(%mount.getEyeTransform(),0,2),%theVector);   
            }

Thanks, would this work on other tank add ons?

Thanks, would this work on other tank add ons?
The code might look abit different for those. You'll have to remove it manually for every turret add-on.

It is - remove this code from Vehicle_Tank.cs:       
The launcher is just going to update the file back to normal. You'd want to use an add-on to modify or redefine the function

The launcher is just going to update the file back to normal. You'd want to use an add-on to modify or redefine the function
You'd want to set the add-on to read-only, yes.

Or do it properly by making an add-on instead of stuffty workarounds

like gr8 said it's recoil and you're gonna get a lot of it when you fire a shell the size of an infant

The turret recoil is fine.

I'd say there's got to be some really bad design choice if your vehicles are flipping over.

I actually have an add-on created for me that does exactly this. I can give it to you if you want. Sorry for not giving it out straight away.
« Last Edit: June 05, 2014, 10:22:36 PM by Legodude77 »

I actually have an add-on created for me that does exactly this. I can give it to you if you want.
Or you can stop being stupid and post a link here, as that is clearly what he wants.


I can give it to you if you want.
Can we please stop doing this?