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
![Smile :)](./images/smilies/icon_e_smile.gif)
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
First Argument always should be 0 (dunno what happens else
![Wink ;)](./images/smilies/icon_e_wink.gif)
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
![Smile :)](./images/smilies/icon_e_smile.gif)
![Wink ;)](./images/smilies/icon_e_wink.gif)
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
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
![Wink ;)](./images/smilies/icon_e_wink.gif)