Here is a realism mod that can be installed on individual maps via a script. All it does is increase the accuracy of some weapons to a believable level just like in OFP.
Download demo mission here!
The code in the script looks like this:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;This is the Mini Realism Mod made by Celery.
;It increases the accuracy of the weapons listed
;in _accuracyarray by making the bullet fly exactly
;where the barrel points, eliminating dispersion.
;
;Use and modification is unrestricted, crediting
;of the original author is not necessary but it
;would be a beautiful gesture.
;
;Activated by a "fired" eventhandler.
_unit=_this select 0
_weapon=_this select 1
_accuracyarray=["G36A","G36C", "G36K","AK74","M16A2"," ;M4","M4AIM","M4A1","Makar ov","M9"]
_bullet=nearestobject [_unit, _this select 4]
?!(_weapon in _accuracyarray):exit
_speed=(speed _bullet)/3.6
_dir=_unit weapondirection _weapon
_vel=[(_dir select 0)*_speed,(_dir select 1)*_speed,(_dir select 2)*_speed]
_bullet setvelocity _vel
_bullet setvectordir _dir
exit[/QUOTE]
The script will be executed by an eventhandler, in the mission it's like this in the init line of the soldier:
this addeventHandler ["fired", {_this exec "cly_realism.sqs"}]
You can add or remove the weapon classnames as you see fit to include those weapons to have increased accuracy. The speed divided by 3.6 is the formula to make the 3 dimensional velocity match the original speed of the bullet. You can even increase the speed to make bullets faster and deadlier with less drop. I encourage everyone to modify the script, maybe even make it better and more advanced and show how you did it in here.
HOME 
Reply With Quote



sickboy!
