First things first.
Type
Code: Select all
soldier.camerashakefactor 1
This enables a camerashake effect for the soldier. Yeah. So, if you start running around, you'll notice a slight headbobbing and that your crosshair jiggles around a bit. Very subtle. Cool thing is depending on your stance the strength changes.
So, I found where this shakes are defined some months ago, but just recently worked a bit on them to enhance the shakeeffects.
Animations\AnimationStatesLower.con
Check AnimationStateMachine.createState Lb_RunForward . In the end of this paragraph there are these lines:
Code: Select all
AnimationStateMachine.setCameraShakeLeftRight 0 0.02 5
AnimationStateMachine.setCameraShakeYaw 0 0.15 8.0
AnimationStateMachine.setCameraShakeUpDown 0 0.08 15
AnimationStateMachine.setCameraShakeFadeIn 0 0.6
First Argument always should be 0 (dunno what happens else ).
Second argument defines the strength of the shake. A shake of 1 is ten times stronger than 0.1 . Simple.
Third argument defines the amount of time in which the shake should occur. This is not in seconds. It's a bit difficult to say precisely, but just fiddling with it you'll notice quickly what settings fit quite good.
The real difficulty is to make the camerashake look fitting to the weapon animations, which usually have a left-right-swaying-animation.
But, this actually allows for various stuff to accomplish. You could make a "realism"-mod and set a pretty heavy swaying camera when running so people are encouraged to stand still for shooting (as not only the camera shakes, but the crosshair does too!) or prefer walking (which again can be set up separatly ). Or you could make something completely crazy and get all BF soldiers drunk, adding very strong and slow sway animations for every stance. Did this once (even for Stand-Animation ) and it really gets you crazy. It's especially funny because you no longer are able to walk straight ahead. As the animation sways your crosshair heavily, it obviously also changes your direction of movement. Would be quite funny to have 30 guys staggering around on a server trying to kill the others...
Only downside: You can't deny people to switch the camerashake off manually...by setting it to 1 in a .con you merely make it active in the beginning, but if anyone types it in the console with "0", the effect gets deactivated...so best is to not inform your players about this possibility . Ignorance is bliss!