OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pexmo on 07 Jan 2005, 17:57:03
-
Greetings once again mates.
OK here are my new questions for the gurus around here to solve:
1: Can i edit wepons to not recenter after firing? So that you get a recoil similar to Raven Shield. I have come across INQs m24 it has that recoil.
If its possible please describe how.
2: Is there a way to add custom dispersion to weapons, like inq weps etc? if itcan be done i some config please describe gow im all green to that kind of editing.
3: whats the best "make so that ai cant shoot so damn good" script out there that can be set to all types of enemy units not just HD units.
-
1) no clue
2) I believe it is done in the config, so i would say look in the JAM2 HD weapons config
3) the simpler(and less good) way would be to use setdammage with a negative number. it will make them "excited" and their aim will suck. problem there is that they will be able to take a few hits before they die...at least that would be the logical way of thinking, but with OFP, well..... logic hardly applies
-
1) Same as Triggerhappy, no clue
2)In the CfgWeapons part of the config, there is a setting called dispersion ex. dispersion=0.0007; Adjusting this value will adjust the dispersion of a weapon. The higher the value, the higher the dispersion.
3)Adjusting his skill level in the mission editor might help. Putting his skill to the lowest value might affect his accuracy, although I could be wrong.
-
A real greeny question: Exactly what config file should i edit ?
And where do i find it? (if its in a .pbo file, then how do i get to it)
-
Use Amalfis PBO Decrypter 1.5 ......available in the Editors Depot.
It will unpack the PBO.
Inside the resulting folder you should find the config.cpp for the addon.
Planck
-
thx alot ill try that.
On the recoil bit: If you guys dont get what i meen and have INQs inq_m24 rifle in your addons try it and u get what i meen. It jumps ut when u shoot and stays there i dont recenter.
-
Where can I get INQ's M24?
-
its in INQs weapon pack
I have specificly tested the cammo version of his m24 and it has the recoil im looking for
-
Could you please give me a link to the weapon pack, I'm having no luck finding it anywhere :-[
-
I was wrong the inq_m24 did only have that recoil in zoomed in sniper view.
I have tested some recoil values but i cant figure the recoil parameters out.
I dont seem to find a way that makes the guns recenter slower, some rifles in inq weppack already does that, like the in1_m24 in zoomed out mode.
Anyone have any input on what value is the speed of the recovery to centerd sight?
-
I was looking through the WFW M82A1 config, and found this:
class CfgRecoils
{
WFWBarret[]={0.022000,0,0,0.060000,0.014000,0.020000,0.050000,0.006000,0.060000,0.340000,0,0};
};
These values affect the recoil somehow. As I don't have experience making guns, I can't tell you what these values mean. The only suggestion I can give is to play with these values and see what they do.
-
Hey pexmo!
An answer to #3 you could try this script by General Coder:
Maybe you can use a temporaly fire dispersion script... They shoot but they don't hit anything.At least that's how I should solve the problem.
Put this in your V80's init :
Code:
This addeventhandler ["fired",{_this exec "fd.sqs"}]
And this in a init.sqs
dispersionoff = false
When you want to stop the dispersion script put
dispersionoff = true
in a waypoint, trigger or script.
Here is fd.sqs by GeneralCoder
Code:
;;fd.sqs
_shooter = _this select 0
_projectile = nearestObject [vehicle(_shooter), _this select 4]
?dispersionoff : _shooter removeEventHandler ["fired",0];exit
?(_shooter == player): exit
?((_this select 2) == "throw"): exit
_vel = velocity _projectile
_speed = speed _projectile
_disp = (_speed * (0.03 - (skill _shooter)/100) )
_dispX2 = _disp*2
_projectile SetVelocity [(_vel select 0) - _disp + Random(_dispX2),(_vel select 1) - _disp + Random(_dispX2),(_vel select 2) - _disp + Random(_dispX2)]
If you want more dispersion change 0.03 in this line
Code:
_disp = (_speed * (0.03 - (skill _shooter)/100) )
...in a higher value
Wadmann